Skip to content

Commit

Permalink
Prevent GetProgramCommandLine() from converting the quotes, and do it…
Browse files Browse the repository at this point in the history
… only when needed, in the Execute method
  • Loading branch information
belkiss committed Jan 10, 2022
1 parent 922e1ae commit b901386
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sharpmake/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public static string GetProgramCommandLine()
{
string commandLine = Environment.CommandLine.Remove(0, commandLineArgs[0].Length + 1);
commandLine = commandLine.Trim(' ', '\"');
commandLine = commandLine.Replace(@"'", @"""");
return commandLine;
}

Expand Down Expand Up @@ -178,7 +177,7 @@ private static void Execute(Type type, object instance, string commandLine, stri
{
bool isStatic = instance == null;

Parameter[] parameters = GetParameters(commandLine);
Parameter[] parameters = GetParameters(commandLine.Replace(@"'", @""""));
if (parameters.Length == 0)
return;

Expand Down

0 comments on commit b901386

Please sign in to comment.