Skip to content

Commit 0f16663

Browse files
committed
cli/edit: Don't error out if host spec unchanged
This matches e.g. `kubectl edit`. Signed-off-by: Jonathan Lebon <[email protected]>
1 parent 82a6a5a commit 0f16663

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/cli.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ async fn edit(opts: EditOpts) -> Result<()> {
438438
};
439439

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

0 commit comments

Comments
 (0)