From 4467a8c7421bb4b60e5088bca851c1fd7d4fec50 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 8 Jan 2026 23:05:06 -0500 Subject: [PATCH] Remove overly-verbose ssh key input prompt --- clip/arguments.go | 2 +- core/init.go | 2 +- crypt/rcw.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clip/arguments.go b/clip/arguments.go index 333fcb1..49dae3c 100644 --- a/clip/arguments.go +++ b/clip/arguments.go @@ -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) } diff --git a/core/init.go b/core/init.go index 59110de..52fdb9e 100644 --- a/core/init.go +++ b/core/init.go @@ -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()) diff --git a/crypt/rcw.go b/crypt/rcw.go index 57128ca..d4d3ad7 100644 --- a/crypt/rcw.go +++ b/crypt/rcw.go @@ -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)) }