Skip to content

Commit

Permalink
Correctly Trim Escaped Arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Kohl committed Oct 17, 2024
1 parent e157372 commit 8d31b06
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/BinSkim.Driver/ExpandArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ public static string[] GenerateArguments(

foreach (string argument in args)
{
if (!IsResponseFileArgument(argument))
string trimArgument = argument.Trim('"');
if (!IsResponseFileArgument(trimArgument))
{
expandedArguments.Add(argument);
expandedArguments.Add(trimArgument);
continue;
}

string responseFile = argument.Trim('"').Substring(1);
string responseFile = trimArgument.Substring(1);

responseFile = environmentVariables.ExpandEnvironmentVariables(responseFile);
responseFile = fileSystem.PathGetFullPath(responseFile);
Expand Down

0 comments on commit 8d31b06

Please sign in to comment.