forked from tildetown/town
		
	success note
This commit is contained in:
		
							parent
							
								
									add129826a
								
							
						
					
					
						commit
						69666edefa
					
				| @ -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 | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user