Skip to content

Commit

Permalink
Use env if dash is present. (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-rieke authored Jun 27, 2024
1 parent aed1581 commit 9b78e18
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion atrium/vestibulum/trcshbase/trcsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,12 @@ func ProcessDeploy(featherCtx *cap.FeatherContext, trcshDriverConfig *capauth.Tr
region = trcshDriverConfig.DriverConfig.Regions[0]
}

configErr := trcconfigbase.CommonMain(&trcshDriverConfig.DriverConfig.Env, &mergedVaultAddress, &token, &mergedEnvBasis, &configRoleSlice[1], &configRoleSlice[0], &tokenName, &region, nil, []string{"trcsh"}, &trcshDriverConfig.DriverConfig)
envConfig := &trcshDriverConfig.DriverConfig.EnvBasis
if strings.Contains(trcshDriverConfig.DriverConfig.Env, "-") {
envConfig = &trcshDriverConfig.DriverConfig.Env
}

configErr := trcconfigbase.CommonMain(envConfig, &mergedVaultAddress, &token, &mergedEnvBasis, &configRoleSlice[1], &configRoleSlice[0], &tokenName, &region, nil, []string{"trcsh"}, &trcshDriverConfig.DriverConfig)
if configErr != nil {
fmt.Println("Preload failed. Couldn't find required resource.")
trcshDriverConfig.DriverConfig.CoreConfig.Log.Printf("Preload Error %s\n", configErr.Error())
Expand Down

0 comments on commit 9b78e18

Please sign in to comment.