Preserve Node tool-manager shim names during native installation

This commit is contained in:
2026-11-08 16:54:17 +00:00
parent fdc411716f
commit bd9509b744
2 changed files with 18 additions and 1 deletions
+3 -1
View File
@@ -333,7 +333,9 @@ class Setup:
return target
def configure_web(self, prefix, args, web_build=None):
node = str(Path(shutil.which("node")).resolve())
# Tool-manager shims dispatch by their invoked name (for example Volta).
# Resolving the symlink would run volta-shim instead of node.
node = str(Path(shutil.which("node")).absolute())
version = self.runner([node, "--version"], capture_output=True, text=True)
try:
major = int(version.stdout.strip().removeprefix("v").split(".")[0])