~delthas/senpai-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

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

Details
Message ID
<20240121233157.101538-1-admin@xenrox.net>
DKIM signature
pass
Download raw message
Patch: +1 -1
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
Details
Message ID
<4fb635ec-69be-4081-ad1d-80735d746413@dille.cc>
In-Reply-To
<20240121233157.101538-1-admin@xenrox.net> (view parent)
DKIM signature
pass
Download raw message
Hi, thanks for the patch! Pushed.

To git.sr.ht:~delthas/senpai
    8d58ad6..e46263f  master -> master
Reply to thread Export thread (mbox)