Skip to content

Commit

Permalink
(chocolatey#2410) Update to escape single quote as well as double quo…
Browse files Browse the repository at this point in the history
…tes.
  • Loading branch information
BlythMeister committed Aug 23, 2022
1 parent 0cfe727 commit 9941294
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private string get_script_arguments(string script, ChocolateyConfiguration confi

private string prepare_powershell_arguments(string argument)
{
return argument.to_string().Replace("\"", "\\\"");
return argument.to_string().Replace("\"", "\\\"").Replace("'", "\\'");
}

public bool run_action(ChocolateyConfiguration configuration, PackageResult packageResult, CommandNameType command)
Expand Down

0 comments on commit 9941294

Please sign in to comment.