Skip to content

Commit

Permalink
fix(msvs): do not fix paths in action command arguments
Browse files Browse the repository at this point in the history
BREAKING CHANGE: On Windows, arguments passed to the "action" commands are no longer transformed to replace slashes with backslashes.
  • Loading branch information
targos authored and gengjiawen committed Dec 16, 2020
1 parent d0504e6 commit fc22f83
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pylib/gyp/generator/msvs.py
Expand Up @@ -423,13 +423,7 @@ def _BuildCommandLineForRuleRaw(
# file out of the raw command string, and some commands (like python) are
# actually batch files themselves.
command.insert(0, "call")
# Fix the paths
# TODO(quote): This is a really ugly heuristic, and will miss path fixing
# for arguments like "--arg=path" or "/opt:path".
# If the argument starts with a slash or dash, it's probably a command line
# switch
arguments = [i if (i[:1] in "/-") else _FixPath(i) for i in cmd[1:]]
arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in arguments]
arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in cmd[1:]]
arguments = [MSVSSettings.FixVCMacroSlashes(i) for i in arguments]
if quote_cmd:
# Support a mode for using cmd directly.
Expand Down

0 comments on commit fc22f83

Please sign in to comment.