diff options
author | Alex McGrath <amk@amk.ie> | 2021-11-24 13:52:21 +0000 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-11-24 15:04:36 +0100 |
commit | bbb92bbfa026bdd0bab7ea64230a07aa70f98ba2 (patch) | |
tree | a7e824bea6b48ab937b2373777bd5c4a564eda28 /config.go | |
parent | Tidy things (diff) |
Only use first line of `password-cmd` output
Diffstat (limited to 'config.go')
-rw-r--r-- | config.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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...) |