Skip to content

Commit

Permalink
revert part of dotnet/corefx#24098. do not use shell to find KDestroy…
Browse files Browse the repository at this point in the history
…Cmd. (dotnet/corefx#24682)

Commit migrated from dotnet/corefx@f757a32
  • Loading branch information
wfurt authored and danmoseley committed Oct 18, 2017
1 parent 7d4bc53 commit 1de723e
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 1de723e

Please sign in to comment.