commit e46263f

Thorben Günther  ·  2024-01-21 23:31:53 +0000 UTC
parent 8d58ad6
config: Don't wrap error for password-cmd failure

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.
1 files changed,  +1, -1
+1, -1
1@@ -258,7 +258,7 @@ func unmarshal(filename string, cfg *Config) (err error) {
2 			cmd := exec.Command(cmdName, d.Params[1:]...)
3 			var stdout []byte
4 			if stdout, err = cmd.Output(); err != nil {
5-				return fmt.Errorf("error running password command: %w", err)
6+				return fmt.Errorf("error running password command: %v", err)
7 			}
8 
9 			passCmdOut := strings.Split(string(stdout), "\n")