Skip to content

Commit cfdd74e

Browse files
committed
Fix test condition
1 parent 879f232 commit cfdd74e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/IronPython/Hosting/PythonCommandLine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static bool FindRunner(string prefix, string name, string assembly, out string r
328328
}
329329
prefix = Path.GetDirectoryName(prefix);
330330
}
331-
if (runner != null && Path.GetExtension(assembly).Equals(".dll", StringComparison.OrdinalIgnoreCase)) {
331+
if (prefix != null && Path.GetExtension(assembly).Equals(".dll", StringComparison.OrdinalIgnoreCase)) {
332332
// make sure that the runner refers to this DLL
333333
var relativeAssemblyPath = assembly.Substring(prefix.Length + 1); // skip over the path separator
334334
byte[] fsAssemblyPath = Encoding.UTF8.GetBytes(relativeAssemblyPath);
@@ -350,7 +350,7 @@ static bool FindRunner(string prefix, string name, string assembly, out string r
350350
}
351351
if (found) return true;
352352
}
353-
} catch { }
353+
} catch { } // if reading the file fails, it is not our runner
354354
}
355355
#endif
356356
return false;

0 commit comments

Comments
 (0)