Skip to content

Commit

Permalink
remove os.Set
Browse files Browse the repository at this point in the history
remove os.Set
  • Loading branch information
jiuker committed Aug 17, 2024
1 parent d255154 commit 5b01d0c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,6 @@ func (config *Config) getTransport() http.RoundTripper {

func (config *Config) isTLS() bool {
if stsEndpoint := env.Get("MC_STS_ENDPOINT_"+config.Alias, ""); stsEndpoint != "" {
// set AWS_WEB_IDENTITY_TOKEN_FILE is MC_WEB_IDENTITY_TOKEN_FILE is set
if val := env.Get("MC_WEB_IDENTITY_TOKEN_FILE_"+config.Alias, ""); val != "" {
os.Setenv("AWS_WEB_IDENTITY_TOKEN_FILE", val)
if val := env.Get("MC_ROLE_ARN_"+config.Alias, ""); val != "" {
os.Setenv("AWS_ROLE_ARN", val)
}
if val := env.Get("MC_ROLE_SESSION_NAME_"+config.Alias, randString(32, rand.NewSource(time.Now().UnixNano()), "mc-session-name-")); val != "" {
os.Setenv("AWS_ROLE_SESSION_NAME", val)
}
}
stsEndpointURL, err := url.Parse(stsEndpoint)
if err != nil {
return false
Expand Down

0 comments on commit 5b01d0c

Please sign in to comment.