From d3b7bcdec90d6c1b1affc15ece706e63007b7264 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 25 Oct 2023 15:28:02 +0900 Subject: [PATCH] fix: add quotes for command in msvs generator (#217) 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. --- pylib/gyp/generator/msvs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py index 1f9e2497..13b0794b 100644 --- a/pylib/gyp/generator/msvs.py +++ b/pylib/gyp/generator/msvs.py @@ -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)