fix: npm-real launcher (npm is a JS symlink, mv broke it); keep .git in vendored git: packages (pi runs git fetch on existing installs)
This commit is contained in:
@@ -59,7 +59,8 @@ for pkg in settings.get("packages") or []:
|
||||
subprocess.run(["git", "clone", "--quiet", url, str(target)], check=True)
|
||||
if ref:
|
||||
subprocess.run(["git", "checkout", "--quiet", ref], cwd=target, check=True)
|
||||
shutil.rmtree(target / ".git", ignore_errors=True)
|
||||
# keep .git: pi's package manager runs `git fetch` + `rev-parse` on
|
||||
# existing installs; a stripped dir would fail resolution.
|
||||
if (target / "package.json").exists():
|
||||
npm = "/usr/bin/npm" if Path("/usr/bin/npm").exists() else "npm"
|
||||
subprocess.run(
|
||||
|
||||
Reference in New Issue
Block a user