~delthas/senpai-dev

config: Don't wrap error for password-cmd failure v1 APPLIED

Thorben Günther: 1
 config: Don't wrap error for password-cmd failure

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~delthas/senpai-dev/patches/48758/mbox | git am -3
Learn more about email & git

[PATCH] config: Don't wrap error for password-cmd failure Export this patch

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
Hi, thanks for the patch! Pushed.

To git.sr.ht:~delthas/senpai
    8d58ad6..e46263f  master -> master