Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #116 from docker/fix-utm
Browse files Browse the repository at this point in the history
Fix Snyk utm env vars
  • Loading branch information
glours authored Sep 22, 2020
2 parents 1bab774 + 5cf098b commit e69d4a0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions internal/provider/snyk.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ func (s *snykProvider) Authenticate(token string) error {
cmd.Env = append(cmd.Env,
"SNYK_UTM_MEDIUM=Partner",
"SNYK_UTM_SOURCE=Docker",
"SNYK_UTM_CAMPAIGN=Docker-Desktop-2020",
"SNYK_INTEGRATION_NAME=DOCKER_DESKTOP")
"SNYK_UTM_CAMPAIGN=Docker-Desktop-2020")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return checkCommandErr(cmd.Run())
Expand All @@ -148,8 +147,9 @@ func (s *snykProvider) Scan(image string) error {
if err != nil {
return fmt.Errorf("failed to get DockerScanID: %s", err)
}
cmd.Env = append(os.Environ(), fmt.Sprintf("SNYK_DOCKER_TOKEN=%s", token))
cmd.Env = append(cmd.Env, fmt.Sprintf("SNYK_DOCKER_TOKEN=%s", token))
}

cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return checkCommandErr(cmd.Run())
Expand Down Expand Up @@ -187,7 +187,10 @@ func (s *snykProvider) Version() (string, error) {

func (s *snykProvider) newCommand(arg ...string) *exec.Cmd {
cmd := exec.CommandContext(s.context, s.path, arg...)
cmd.Env = append(os.Environ(), "NO_UPDATE_NOTIFIER=true", "SNYK_CFG_DISABLESUGGESTIONS=true")
cmd.Env = append(os.Environ(),
"NO_UPDATE_NOTIFIER=true",
"SNYK_CFG_DISABLESUGGESTIONS=true",
"SNYK_INTEGRATION_NAME=DOCKER_DESKTOP")
return cmd
}

Expand Down

0 comments on commit e69d4a0

Please sign in to comment.