}
// Open a file that doesn't exist with an argument that xdg-open considers invalid.
- using (var px = Process.Start(new ProcessStartInfo { UseShellExecute = true, FileName = "/nosuchfile", Arguments = "invalid_arg" }))
+ var startInfo = new ProcessStartInfo { UseShellExecute = true, FileName = "/nosuchfile", Arguments = "invalid_arg" };
+ startInfo.Environment.Remove("DISPLAY"); // Get rid of DISPLAY environment variable as this causes spurious test failures.
+ using (var px = Process.Start(startInfo))
{
Assert.NotNull(px);
px.WaitForExit();