~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] Bail early if password-cmd returns no data

Details
Message ID
<20231026102115.10031-2-hugo@whynothugo.nl>
DKIM signature
missing
Download raw message
Patch: +3 -2
---
 config.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/config.go b/config.go
index d9bfe33..f35da54 100644
--- a/config.go
+++ b/config.go
@@ -218,9 +218,10 @@ func unmarshal(filename string, cfg *Config) (err error) {
			}

			passCmdOut := strings.Split(string(stdout), "\n")
			if len(passCmdOut) >= 1 {
				cfg.Password = &passCmdOut[0]
			if len(passCmdOut) < 1 || strings.TrimSpace(passCmdOut[0]) == "" {
				return fmt.Errorf("password command returned no data")
			}
			cfg.Password = &passCmdOut[0]
		case "channel":
			// TODO: does this work with soju.im/bouncer-networks extension?
			cfg.Channels = append(cfg.Channels, d.Params...)
-- 
2.42.0
Details
Message ID
<40216211-0f12-4bba-8fdd-66a2b6bef08e@dille.cc>
In-Reply-To
<20231026102115.10031-2-hugo@whynothugo.nl> (view parent)
DKIM signature
missing
Download raw message
Hi,

Thanks for your patch.

Applied and pushed. :-)

To git.sr.ht:~taiite/senpai
    1a2bb12..1a5a19c  master -> master
Reply to thread Export thread (mbox)