diff options
author | 2017-02-07 12:48:26 +0000 | |
---|---|---|
committer | 2017-02-07 18:27:09 +0000 | |
commit | fc07142f08f9c32c1f3c757881078aba227de421 (patch) | |
tree | 70aba3849333ae98c2ce1a6824cb8b293fc60b5c /tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl | |
parent | a2c0192e0ca7647178d798cd6ff79699424623ad (diff) |
Add quotes to improve space support
These changes addresses issues where Windows users have a space in their username. Allows the default output_base path to be used.
Closes #2491.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/2491
PiperOrigin-RevId: 146773331
MOS_MIGRATED_REVID=146773331
Diffstat (limited to 'tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl')
-rw-r--r-- | tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl b/tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl index 7b46ef44bf..e3a9c7c499 100644 --- a/tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl +++ b/tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl @@ -509,7 +509,8 @@ class WindowsRunner(object): # Using parameter file as input when linking static libraries. params_file = open(parser.params_file, 'w') for arg in args: - params_file.write(arg + '\n') + params_file.write(('"%s"' % arg) if os.path.isfile(arg) else arg) + params_file.write('\n') params_file.close() except (IOError, e): print('Could not open', parser.params_file, 'for writing:', str(e)) |