Fix interactivity check and git helper arg value
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user