Fix interactivity check and git helper arg value

This commit is contained in:
2025-03-20 22:56:01 +01:00
parent 12d2de6607
commit c49f59122c
2 changed files with 3 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ sealed class GitTokenCredentialProvider : ICredentialProvider
return new GetAuthenticationCredentialsResponse(null, null, null, null, responseCode: MessageResponseCode.Error);
pHelper.StandardInput.WriteLine("protocol=https");
pHelper.StandardInput.WriteLine("username=s" + TokenUserName);
pHelper.StandardInput.WriteLine("username=" + TokenUserName);
pHelper.StandardInput.WriteLine("host=" + request.Uri.DnsSafeHost);
pHelper.StandardInput.WriteLine();
@@ -64,7 +64,7 @@ sealed class GitTokenCredentialProvider : ICredentialProvider
}
// Password not found (we may be allowed to ask for it interactively)
if (request.CanShowDialog)
if (!request.IsNonInteractive)
{
ProcessStartInfo psiDialog = new ProcessStartInfo();
psiDialog.FileName = "zenity";

View File

@@ -10,8 +10,6 @@ public static class Program
public static async Task<int> Main(string[] args)
{
File.WriteAllText("/home/rv/temp/nsc.log", "Starting");
CancellationTokenSource tokenSource = new CancellationTokenSource();
List<ICredentialProvider> credentialProviders = new List<ICredentialProvider>
@@ -103,6 +101,7 @@ public static class Program
catch (Exception e)
{
Console.Error.WriteLine("Error " + e.GetType().Name + ": " + e.Message);
File.WriteAllText("/home/rv/temp/nsc.error.log", "Error " + e.GetType().Name + ": " + e.Message);
return 1;
}
}