If the password command fails, the error will contain
"no such file or directory", so that senpai starts the configuration
assistant.
Simply not wrapping the error fixes the program flow.
---
config.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.go b/config.go
index e7cf553..132250f 100644
--- a/config.go
+++ b/config.go
@@ -258,7 +258,7 @@ func unmarshal(filename string, cfg *Config) (err error) {
cmd := exec.Command(cmdName, d.Params[1:]...)
var stdout []byte
if stdout, err = cmd.Output(); err != nil {
- return fmt.Errorf("error running password command: %w", err)
+ return fmt.Errorf("error running password command: %v", err)
}
passCmdOut := strings.Split(string(stdout), "\n")
base-commit: 8d58ad627e3e891018b8daae315d52ad47675e28
--
2.43.0