success note

trunk
vilmibm 2023-10-26 22:36:48 +00:00
parent add129826a
commit 69666edefa
1 changed files with 3 additions and 3 deletions

View File

@ -290,9 +290,6 @@ func redeemCode(l *log.Logger, db *sql.DB, cs colorScheme, p *Prompter) error {
return nil 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 := exec.Command("sudo", "--user", username, "/town/bin/appendkeyfile")
cmd.Stdin = bytes.NewBufferString(key + "\n") cmd.Stdin = bytes.NewBufferString(key + "\n")
stdoutBuff := bytes.NewBuffer([]byte{}) 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") 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 return nil
} }