Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2020-10-16 09:13:36 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2020-10-16 22:32:03 +0300
commit722b7ae63da8b386fe188066dc2dae0121d9353b (patch)
tree69b32ef9b1b658fd3ef6a1d8492c5dfeb2fd737f /node_modules
parent9476734b7d5fa6df80ad17ad277a6bee9a16235c (diff)
deps: float c2ccc1a on node-gyp
A change to "correctly rename object files for absolute paths" caused a bug in windows. A fix has already landed upstream in gyp-next, but has not yet made it's way to a release of gyp-next or to node-gyp. Let's float the change until it is fixed upstream. Refs: https://github.com/nodejs/gyp-next/pull/74 PR-URL: https://github.com/npm/cli/pull/1974 Credit: @MylesBorins Close: #1974 Reviewed-by: @ruyadorno
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
index e05a8a78a..0d6dddd86 100644
--- a/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
+++ b/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
@@ -3614,13 +3614,12 @@ def _AddSources2(
extension_to_rule_name,
_GetUniquePlatforms(spec),
)
- if group == "compile":
- # Always add an <ObjectFileName> value to support duplicate
- # source file basenames.
+ if group == "compile" and not os.path.isabs(source):
+ # Add an <ObjectFileName> value to support duplicate source
+ # file basenames, except for absolute paths to avoid paths
+ # with more than 260 characters.
file_name = os.path.splitext(source)[0] + ".obj"
- if os.path.isabs(file_name):
- file_name = os.path.splitdrive(file_name)[1]
- elif file_name.startswith("..\\"):
+ if file_name.startswith("..\\"):
file_name = re.sub(r"^(\.\.\\)+", "", file_name)
elif file_name.startswith("$("):
file_name = re.sub(r"^\$\([^)]+\)\\", "", file_name)