Remove overly-verbose ssh key input prompt

This commit is contained in:
2026-01-08 23:05:06 -05:00
parent a54d15e331
commit 4467a8c742
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ func CopyShortcut(realPath string, field int) error {
func ClearArgument() error {
assignedContents := back.ReadFromStdin()
if assignedContents == "" {
os.Exit(0) // use os.Exit instead of core.Exit, as this function runs out of a background subprocess that is invisible to the user (will never appear in GUI/TUI environment)
os.Exit(0) // use os.Exit directly since this function runs out of a background subprocess that is invisible to the user (will never appear in GUI/TUI environment)
}
return ClearProcess(assignedContents)
}
+1 -1
View File
@@ -47,7 +47,7 @@ func LibmuttonInit(inputCB func(prompt string) string, rcwPassword []byte, appen
} else {
// ensure ssh key file exists (and is a file)
fallbackSSHKey := back.Home + global.PathSeparator + ".ssh" + global.PathSeparator + "id_ed25519"
sshKeyPath := cmp.Or(back.ExpandPathWithHome(inputCB(back.AnsiBold+"Note:"+back.AnsiReset+" Only key-based authentication is supported (keys may optionally be password-protected).\n The remote server must already be in your ~"+global.PathSeparator+".ssh"+global.PathSeparator+"known_hosts file.\n\nSSH private identity file path (falls back to \""+fallbackSSHKey+"\"):")), fallbackSSHKey)
sshKeyPath := cmp.Or(back.ExpandPathWithHome(inputCB("SSH private identity file path (falls back to \""+fallbackSSHKey+"\"):")), fallbackSSHKey)
_, err := back.TargetIsFile(sshKeyPath, true)
if err != nil {
return errors.New("unable to find SSH identity file: " + err.Error())
+1 -1
View File
@@ -20,7 +20,7 @@ var RetryPassword = true
func RCWDArgument() {
password := back.ReadFromStdin()
if password == "" {
os.Exit(0)
os.Exit(0) // use os.Exit directly since this function is only intended for non-interactive CLI clients
}
daemon.Start([]byte(password))
}