Skip to content

Commit

Permalink
use default keychain configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Sep 16, 2020
1 parent 038f775 commit e83887a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ var execCmd = &cobra.Command{
log.Fatal(fmt.Sprintf("no profile matching %q found in the configuration file at %s", profileName, defaultFullConfigPath))
}

ring, _ := keyring.Open(keyringDefaults)

keychain, _ := ring.Get(fmt.Sprintf("%s-%s", profileName, profileSection.Key("auth_type").String()))

command := strings.Split(args[1], " ")
executable := command[0]
Expand All @@ -64,6 +61,8 @@ var execCmd = &cobra.Command{
log.Fatalf("couldn't find the executable '%s': %w", executable, err)
}

ring, _ := keyring.Open(keyringDefaults)
keychain, _ := ring.Get(fmt.Sprintf("%s-%s", profileName, profileSection.Key("auth_type").String()))

runningCommand := exec.Command(executable, args...)
runningCommand.Env = append(os.Environ(),
Expand Down

0 comments on commit e83887a

Please sign in to comment.