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

[PATCH senpai v2] Only use first line of `password-cmd` output

Message ID
DKIM signature
Download raw message
Patch: +6 -3
 config.go        | 6 ++++--
 doc/senpai.5.scd | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/config.go b/config.go
index 79c710e..d232cf4 100644
--- a/config.go
+++ b/config.go
@@ -178,8 +178,10 @@ func unmarshal(filename string, cfg *Config) (err error) {
				return fmt.Errorf("error running password command: %s", err)

			password := strings.TrimSuffix(string(stdout), "\n")
			cfg.Password = &password
			passCmdOut := strings.Split(string(stdout), "\n")
			if len(passCmdOut) >= 1 {
				cfg.Password = &passCmdOut[0]
		case "channel":
			// TODO: does this work with soju.im/bouncer-networks extension?
			cfg.Channels = append(cfg.Channels, d.Params...)
diff --git a/doc/senpai.5.scd b/doc/senpai.5.scd
index 8ed9ef2..79b923a 100644
--- a/doc/senpai.5.scd
+++ b/doc/senpai.5.scd
@@ -40,7 +40,8 @@ Some settings are required, the others are optional.
	runtime. This is useful if you store your passwords in a separate (probably
	encrypted) file using `gpg` or a command line password manager such as
	_pass_ or _gopass_. If a *password-cmd* is provided, the value of *password*
	will be ignored and the output of *password-cmd* will be used for login.
	will be ignored and the first line of the output of *password-cmd* will be
	used for login.

	A spaced separated list of channel names that senpai will automatically join
Message ID
<20211124135221.10987-1-amk@amk.ie> (view parent)
DKIM signature
Download raw message
Thanks, pushed!
Reply to thread Export thread (mbox)