提交 b3314129 编写于 作者: M Marek Safar 提交者: Julien Couvreur

Never use raw arguments when running on Mono (#14798)

上级 b63d6d2d
......@@ -171,7 +171,7 @@ public Task<RunCompilationResult> RunCompilationAsync(IEnumerable<string> origin
protected static IEnumerable<string> GetCommandLineArgs(IEnumerable<string> args)
{
if (IsRunningOnWindows)
if (UseNativeArguments())
{
return GetCommandLineWindows(args);
}
......@@ -179,6 +179,21 @@ protected static IEnumerable<string> GetCommandLineArgs(IEnumerable<string> args
return args;
}
private static bool UseNativeArguments()
{
if (!IsRunningOnWindows)
{
return false;
}
if (Type.GetType("Mono.Runtime") != null)
{
return false;
}
return true;
}
/// <summary>
/// When running on Windows we can't take the commmand line which was provided to the
/// Main method of the application. That will go through normal windows command line
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册