From 69666edefa648a841ac6a0aef87040c8e0d227be Mon Sep 17 00:00:00 2001 From: vilmibm Date: Thu, 26 Oct 2023 22:36:48 +0000 Subject: [PATCH] success note --- cmd/help/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/help/main.go b/cmd/help/main.go index 0320586..72789df 100644 --- a/cmd/help/main.go +++ b/cmd/help/main.go @@ -290,9 +290,6 @@ func redeemCode(l *log.Logger, db *sql.DB, cs colorScheme, p *Prompter) error { return nil } - // TODO - // this works: sudo --user help sudo --user wren /town/bin/appendkeyfile < /tmp/foo.pub - // but it's failing with nothing on STDOUT and an exit code of 1 when invoked this way cmd := exec.Command("sudo", "--user", username, "/town/bin/appendkeyfile") cmd.Stdin = bytes.NewBufferString(key + "\n") stdoutBuff := bytes.NewBuffer([]byte{}) @@ -310,6 +307,9 @@ func redeemCode(l *log.Logger, db *sql.DB, cs colorScheme, p *Prompter) error { return errors.New("database was sad") } + fmt.Println() + fmt.Println("new key added! you should be able to use it to log in.") + return nil }