@pawlogic/dl 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dl-npm-update.sh CHANGED
@@ -137,8 +137,16 @@ run_install() {
137
137
  # 里 wrapper 写法)。沙箱进程 owner 是 user,无 /usr/lib/node_modules 写权限;
138
138
  # 不带 prefix → npm 走默认全局路径 → EACCES 1 秒内挂掉, stderr 又被吞 → fleet
139
139
  # 自更新 100% 失败但完全黑盒。这是 PR #729 漏掉 prefix 留下的 bug。
140
+ #
141
+ # --force 必须带: 本脚本 install 后会 `ln -sf /usr/local/bin/dl
142
+ # /home/user/.local/bin/dl` 把 npm shim 顶成软链 (修 PATH 顺序, 见下方
143
+ # ln -sf 那两行)。下次 install 时 npm 看 /home/user/.local/bin/dl 已经存在
144
+ # 且不是它自己管理的, 默认 EEXIST 拒绝覆盖 (error 信息里直接写 "run npm with
145
+ # --force to overwrite"); --force 允许 npm 覆盖。Honeycomb 上 staging
146
+ # dl-selfupdate dataset 看到的所有 npm_fail outcome (#741 接通后) 都是这条,
147
+ # 加 --force 就清零。
140
148
  if HOME=/home/user npm install -g --prefix=/home/user/.local \
141
- --no-audit --no-fund --no-update-notifier \
149
+ --no-audit --no-fund --no-update-notifier --force \
142
150
  "$PACKAGE@$DL_NPM_DIST_TAG" >/dev/null 2>"$_errlog"; then
143
151
  _outcome=ok
144
152
  else