commands: detect when an edit title doesn't change it and abort the operation

This commit is contained in:
Michael Muré 2018-09-26 16:28:57 +02:00
parent ac29b8253e
commit 18f5c1632f
No known key found for this signature in database
GPG Key ID: A4457C029293126F

View File

@ -38,6 +38,10 @@ func runTitleEdit(cmd *cobra.Command, args []string) error {
}
}
if titleEditTitle == snap.Title {
fmt.Println("No change, aborting.")
}
err = b.SetTitle(titleEditTitle)
if err != nil {
return err