Skip to content

Commit

Permalink
move debug closer to where it actually happening
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Sep 16, 2020
1 parent ce7ff4e commit 97fcf95
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,12 @@ var execCmd = &cobra.Command{

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

fmt.Printf("%v", string(i.Data))

log.Debug("environment is populated with credentials")

command := exec.Command(args[1])
command.Env = append(os.Environ(),
fmt.Sprintf("CLOUDFLARE_EMAIL=%s", profileSection.Key("email").String()),
fmt.Sprintf("CLOUDFLARE_%s=%s", strings.ToUpper(profileSection.Key("auth_type").String()), string(i.Data)),
)
log.Debug("environment is populated with credentials")
commandOutput := &bytes.Buffer{}
command.Stdout = commandOutput
err = command.Run()
Expand Down

0 comments on commit 97fcf95

Please sign in to comment.