-
Notifications
You must be signed in to change notification settings - Fork 847
Closed
Labels
Area-TestingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Description
The executeProcess function is called with the workingDir parameter = "".
Somehow the working directory is defaulting to C:\Windows\System32 when the workingDir parameter = "", which causes an exception from the lines below.
#if DEBUG
File.WriteAllLines(Path.Combine(workingDir, "StandardOutput.txt"), outputList)
File.WriteAllLines(Path.Combine(workingDir, "StandardError.txt"), errorsList)
#endifAn exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll but was not handled in user code
Access to the path 'C:\Windows\System32\StandardOutput.txt' is denied.
Some other tests are also affected.
We need to default the working directory to the assembly location. Maybe like this:
#if DEBUG
let workingDir' =
if workingDir = ""
then
let executionLocation = Assembly.GetExecutingAssembly().Location
Path.GetDirectoryName executionLocation
else
workingDir
File.WriteAllLines(Path.Combine(workingDir', "StandardOutput.txt"), outputList)
File.WriteAllLines(Path.Combine(workingDir', "StandardError.txt"), errorsList)
#endifMetadata
Metadata
Assignees
Labels
Area-TestingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.