Skip to content

Commit

Permalink
cli/edit: Don't error out if host spec unchanged
Browse files Browse the repository at this point in the history
This matches e.g. `kubectl edit`.
  • Loading branch information
jlebon committed Nov 1, 2023
1 parent 82a6a5a commit b16e1ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ async fn edit(opts: EditOpts) -> Result<()> {
};

if new_host.spec == host.spec {
anyhow::bail!("No changes in current host spec");
println!("Edit cancelled, no changes made.");
return Ok(());
}
let new_spec = RequiredHostSpec::from_spec(&new_host.spec)?;
let fetched = pull(repo, &new_spec.image, opts.quiet).await?;
Expand Down

0 comments on commit b16e1ed

Please sign in to comment.