-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
There's logic in the azureauth ado token command that checks for environment variables AZUREAUTH_ADO_PAT and SYSTEM_ACCESSTOKEN.
| // First attempt using a PAT. | |
| var pat = PatFromEnv.Get(env); | |
| if (pat.Exists) | |
| { | |
| logger.LogDebug($"Using PAT from env var {pat.EnvVarSource}"); | |
| logger.LogInformation(FormatToken(pat.Value, this.Output, Authorization.Basic)); | |
| return 0; | |
| } |
While returning SYSTEM_ACCESSTOKEN makes sense, I was surprised to see it returning the PAT variable if it's set, which was a little unexpected given the token subcommand. I did see a case for one of our customers where SYSTEM_ACCESSTOKEN was set to a PAT which also is unexpected.
Perhaps there could be a flag for the command to ignore environment variables?
Metadata
Metadata
Assignees
Labels
No labels