Skip to content

Commit

Permalink
fix: add quotes for command in msvs generator (#217)
Browse files Browse the repository at this point in the history
The msvs generator only added quotes for arguments of the action, the command itself should have quotes too.

Without this change actions will fail when python binary is placed in a path with spaces in it.
  • Loading branch information
zcbenz authored Oct 25, 2023
1 parent d83b0e5 commit d3b7bcd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pylib/gyp/generator/msvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ def _BuildCommandLineForRuleRaw(
# Support a mode for using cmd directly.
# Convert any paths to native form (first element is used directly).
# TODO(quote): regularize quoting path names throughout the module
command[1] = '"%s"' % command[1]
arguments = ['"%s"' % i for i in arguments]
# Collapse into a single command.
return input_dir_preamble + " ".join(command + arguments)
Expand Down

0 comments on commit d3b7bcd

Please sign in to comment.