Skip to content

Commit 99575a1

Browse files
authored
Do not redirect stderr for exec auth provider
1 parent f7450f9 commit 99575a1

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/KubernetesClient/KubernetesClientConfiguration.ConfigFile.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ public partial class KubernetesClientConfiguration
3333
/// </summary>
3434
public static TimeSpan ExecTimeout { get; set; } = TimeSpan.FromMinutes(2);
3535

36-
/// <summary>
37-
/// Exec process Standard Errors
38-
/// </summary>
39-
public static event EventHandler<DataReceivedEventArgs> ExecStdError;
40-
4136
/// <summary>
4237
/// Initializes a new instance of the <see cref="KubernetesClientConfiguration" /> from default locations
4338
/// If the KUBECONFIG environment variable is set, then that will be used.
@@ -535,7 +530,7 @@ public static Process CreateRunnableExternalProcess(ExternalExecution config)
535530
}
536531

537532
process.StartInfo.RedirectStandardOutput = true;
538-
process.StartInfo.RedirectStandardError = true;
533+
process.StartInfo.RedirectStandardError = false;
539534
process.StartInfo.UseShellExecute = false;
540535
process.StartInfo.CreateNoWindow = true;
541536

@@ -565,11 +560,6 @@ public static ExecCredentialResponse ExecuteExternalCommand(ExternalExecution co
565560
try
566561
{
567562
process.Start();
568-
if (ExecStdError != null)
569-
{
570-
process.ErrorDataReceived += (s, e) => ExecStdError.Invoke(s, e);
571-
process.BeginErrorReadLine();
572-
}
573563
}
574564
catch (Exception ex)
575565
{

0 commit comments

Comments
 (0)