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

Michael Muré created

Change summary

commands/title_edit.go | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

commands/title_edit.go 🔗

@@ -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