From ef4d45cdb9daf0cbca0cf26cd9c29e5b38f70c08 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 24 Oct 2023 04:43:03 +0100 Subject: [PATCH] gyp: add quotes for action's executable --- node.gyp | 4 ++-- tools/gyp/pylib/gyp/generator/msvs.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/node.gyp b/node.gyp index 93e4235a0f3efd..3f6915b266fc38 100644 --- a/node.gyp +++ b/node.gyp @@ -762,7 +762,7 @@ '<(fipsmodule)', ], 'action': [ - 'python', 'tools/copyfile.py', + '<(python)', 'tools/copyfile.py', '<(fipsmodule_internal)', '<(fipsmodule)', ], @@ -772,7 +772,7 @@ 'inputs': [ '<(opensslconfig)', ], 'outputs': [ '<(opensslconfig_internal)', ], 'action': [ - 'python', 'tools/enable_fips_include.py', + '<(python)', 'tools/enable_fips_include.py', '<(opensslconfig)', '<(opensslconfig_internal)', '<(fipsconfig)', diff --git a/tools/gyp/pylib/gyp/generator/msvs.py b/tools/gyp/pylib/gyp/generator/msvs.py index fd950057847980..568109035ed976 100644 --- a/tools/gyp/pylib/gyp/generator/msvs.py +++ b/tools/gyp/pylib/gyp/generator/msvs.py @@ -438,6 +438,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)