From 4062242063e6870cba521aea477bc2a1d30ab84e Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 20 Jun 2025 09:51:26 -0700 Subject: [PATCH] fix: break long error messages to meet line length limits Split long error messages at logical points to comply with 120 character line length limit while maintaining readability. --- internal/secret/crypto.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/secret/crypto.go b/internal/secret/crypto.go index d0fc8e4..328f9a2 100644 --- a/internal/secret/crypto.go +++ b/internal/secret/crypto.go @@ -85,12 +85,16 @@ func ReadPassphrase(prompt string) (string, error) { // Check if stdin is a terminal if !term.IsTerminal(syscall.Stdin) { // Not a terminal - never read passphrases from piped input for security reasons - return "", fmt.Errorf("cannot read passphrase from non-terminal stdin (piped input or script). Please set the SB_UNLOCK_PASSPHRASE environment variable or run interactively") + return "", fmt.Errorf("cannot read passphrase from non-terminal stdin " + + "(piped input or script). Please set the SB_UNLOCK_PASSPHRASE " + + "environment variable or run interactively") } // stdin is a terminal, check if stderr is also a terminal for interactive prompting if !term.IsTerminal(syscall.Stderr) { - return "", fmt.Errorf("cannot prompt for passphrase: stderr is not a terminal (running in non-interactive mode). Please set the SB_UNLOCK_PASSPHRASE environment variable") + return "", fmt.Errorf("cannot prompt for passphrase: stderr is not a terminal " + + "(running in non-interactive mode). Please set the SB_UNLOCK_PASSPHRASE " + + "environment variable") } // Both stdin and stderr are terminals - use secure password reading