Skip to content

Commit

Permalink
Only init the aws session when in an AWS context
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Duchesne committed Nov 2, 2018
1 parent b45079e commit bcd96de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ func findRemoteConfigFiles(parameterValues map[string]string) []string {
configPaths = strings.Split(configPathString, ":")
}

aws_helper.InitAwsSession("")
if awsConfigExist() {
aws_helper.InitAwsSession("")
}
tempDir := must(ioutil.TempDir("", "tgf-config-files")).(string)
defer os.RemoveAll(tempDir)

Expand Down

0 comments on commit bcd96de

Please sign in to comment.