Skip to content

Commit a3d44e4

Browse files
committed
Update SeleniumStandaloneServer.cs
1 parent 4c72f97 commit a3d44e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Shared/E2ETesting/SeleniumStandaloneServer.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,17 @@ private static async Task InitializeInstance(ITestOutputHelper output)
100100
psi.Arguments = $"/c npm {psi.Arguments}";
101101
}
102102

103+
// It's important that we get the folder value before we start the process to prevent
104+
// untracked processes when the tracking folder is not correctly configure.
105+
var trackingFolder = GetProcessTrackingFolder();
106+
103107
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
104108
{
105109
// Just create a random tracking folder on helix
106110
trackingFolder = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
107111
Directory.CreateDirectory(trackingFolder);
108112
}
109113

110-
// It's important that we get the folder value before we start the process to prevent
111-
// untracked processes when the tracking folder is not correctly configure.
112-
var trackingFolder = GetProcessTrackingFolder();
113114
if (!Directory.Exists(trackingFolder))
114115
{
115116
throw new InvalidOperationException($"Invalid tracking folder. Set the 'SeleniumProcessTrackingFolder' MSBuild property to a valid folder.");

0 commit comments

Comments
 (0)