Skip to content

Commit

Permalink
Pass in isQueit, it ignored it when getting from env
Browse files Browse the repository at this point in the history
  • Loading branch information
Viterkim committed Jun 17, 2022
1 parent daa5a04 commit 9be647b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/authwrapper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {
}
}

exitCode, err := runCommandWithSSHAgent(agent, config.Command, config.Args)
exitCode, err := runCommandWithSSHAgent(agent, config.Command, config.Args, config.AuthWrapperQuiet)
if err != nil {
log.Fatalf("runCommandWithSSHAgent: %v", err)
}
Expand Down
8 changes: 2 additions & 6 deletions cmd/authwrapper/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ import (

var httpClient = &http.Client{Timeout: 10 * time.Second}

func runCommandWithSSHAgent(agent agent.ExtendedAgent, command string, args []string) (exitCode int, err error) {
func runCommandWithSSHAgent(agent agent.ExtendedAgent, command string, args []string, isQuiet bool) (exitCode int, err error) {
sshAuthSock, err := sshagent.StartSSHAgentServer(agent)
if err != nil {
return 255, fmt.Errorf("Failed to start ssh agent server: %v", err)
}

// Hide this behind quiet until the Go standard library has support for the new "agentc" extension in Open-SSH
config, err := parseEnvironment()
if err != nil {
log.Fatalf(": %v", err)
}
if config.AuthWrapperQuiet == false {
if isQuiet == false {
os.Setenv("SSH_AUTH_SOCK", sshAuthSock)
}

Expand Down

0 comments on commit 9be647b

Please sign in to comment.