mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-29 13:26:35 -04:00
Make use of libmutton's new core.PrintError utility function
This commit is contained in:
+2
-3
@@ -21,8 +21,7 @@ func TempInitCli() {
|
||||
uidSlice := core.GpgUIDListGen()
|
||||
gpgIDInt := inputMenuGen("Select GPG key:", uidSlice)
|
||||
if gpgIDInt == 0 {
|
||||
fmt.Println(core.AnsiError + "No GPG keys found - please generate one" + core.AnsiReset)
|
||||
os.Exit(core.ErrorTargetNotFound)
|
||||
core.PrintError("No GPG keys found - please generate one", core.ErrorTargetNotFound, true)
|
||||
}
|
||||
gpgID = uidSlice[gpgIDInt-1]
|
||||
}
|
||||
@@ -47,7 +46,7 @@ func TempInitCli() {
|
||||
sshKey = cmp.Or(core.ExpandPathWithHome(input("SSH private identity file path (falls back to \""+fallbackSSHKey+"\"):")), fallbackSSHKey)
|
||||
sshKeyIsFile, _ = core.TargetIsFile(sshKey, false, 0)
|
||||
if !sshKeyIsFile {
|
||||
fmt.Println(core.AnsiError+"SSH identity file not found:", sshKey+core.AnsiReset)
|
||||
fmt.Println(core.AnsiError+"SSH identity file not found:", sshKey+core.AnsiReset) // do not exit after error (allow user to retry)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user