Skip to content

Commit 6785dac

Browse files
committed
[dotnet] allow tests to be run with dotnet as well as bazel
1 parent 92f3240 commit 6785dac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dotnet/test/common/Environment/EnvironmentManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ public class EnvironmentManager
2424
private EnvironmentManager()
2525
{
2626
string dataFilePath;
27-
var runfiles = Runfiles.Create();
27+
Runfiles runfiles = null;
2828
try
2929
{
30+
runfiles = Runfiles.Create();
3031
dataFilePath = runfiles.Rlocation("_main/dotnet/test/common/appconfig.json");
3132
}
3233
catch (FileNotFoundException)
@@ -143,6 +144,8 @@ private EnvironmentManager()
143144
try
144145
{
145146
string managerFilePath = "";
147+
runfiles ??= Runfiles.Create();
148+
146149
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
147150
{
148151
managerFilePath = runfiles.Rlocation("_main/dotnet/src/webdriver/manager/windows/selenium-manager.exe");

0 commit comments

Comments
 (0)