Skip to content

Commit

Permalink
Allow passing in the Entra token
Browse files Browse the repository at this point in the history
Partially reverted dotnet#4415 where we still want to be able to pass in the token. This happens in the scenario tests where we get it from Azure CLI manually.
  • Loading branch information
premun committed Feb 5, 2025
1 parent b5e6b42 commit cf16621
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions src/Microsoft.DotNet.Darc/Darc/Options/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,9 @@ public override Operation GetOperation(ServiceProvider sp)
public abstract class CommandLineOptions : ICommandLineOptions
{
[Option('p', "password",
HelpText = "[DEPRECATED] Token used to authenticate to BAR. Please use Azure CLI or an interactive browser login flow.")]
HelpText = "Token used to authenticate to BAR. When omitted, Azure CLI or an interactive browser login flow are used.")]
[RedactFromLogging]
public string BuildAssetRegistryToken
{
get => null;
set
{
if (!string.IsNullOrEmpty(value))
{
Console.WriteLine("The --password option is deprecated. Please use Azure CLI or an interactive browser login flow.");
}
}
}
public string BuildAssetRegistryToken { get; set; } = null;

[Option("github-pat", HelpText = "Token used to authenticate GitHub.")]
[RedactFromLogging]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static async Task<string> Which(string command)
public static string FormatExecutableCall(string executable, params string[] args)
{
var output = new StringBuilder();
var secretArgNames = new[] { "-p", "--password", "--github-pat", "--azdev-pat" };
var secretArgNames = new[] { "--github-pat", "--azdev-pat" };

output.Append(executable);
for (var i = 0; i < args.Length; i++)
Expand Down

0 comments on commit cf16621

Please sign in to comment.