Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
revert part of #24098. do not use shell to find KDestroyCmd. (#24682)
Browse files Browse the repository at this point in the history
  • Loading branch information
wfurt authored and danmoseley committed Oct 18, 2017
1 parent 51f8fb7 commit f757a32
Showing 1 changed file with 8 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,14 @@ public bool CheckAndClearCredentials(ITestOutputHelper output)
}

// Clear the credentials
try
{
var startInfo = new ProcessStartInfo(KDestroyCmd);
startInfo.UseShellExecute = true;
startInfo.CreateNoWindow = true;
startInfo.Arguments = "-A";
using (Process clearCreds = Process.Start(startInfo))
{
clearCreds.WaitForExit();
output.WriteLine("kdestroy returned {0}", clearCreds.ExitCode);
return (clearCreds.ExitCode == 0);
}
}
catch (Win32Exception)
{
// https://github.com/dotnet/corefx/issues/24000
// on these distros right now
Assert.True(PlatformDetection.IsUbuntu1704 ||
PlatformDetection.IsUbuntu1710 ||
PlatformDetection.IsOpenSUSE ||
PlatformDetection.IsFedora ||
PlatformDetection.IsDebian ||
PlatformDetection.IsCentos7);

return false;
var startInfo = new ProcessStartInfo(KDestroyCmd);
startInfo.CreateNoWindow = true;
startInfo.Arguments = "-A";
using (Process clearCreds = Process.Start(startInfo))
{
clearCreds.WaitForExit();
output.WriteLine("kdestroy returned {0}", clearCreds.ExitCode);
return (clearCreds.ExitCode == 0);
}
}

Expand Down

0 comments on commit f757a32

Please sign in to comment.