@cocorograph/hub-agent 0.6.90 → 0.6.91
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/package.json +1 -1
- package/scripts/install.sh +5 -0
package/package.json
CHANGED
package/scripts/install.sh
CHANGED
|
@@ -241,6 +241,11 @@ ensure_npm_user_prefix() {
|
|
|
241
241
|
local cur_prefix
|
|
242
242
|
cur_prefix="$(npm config get prefix 2>/dev/null || echo '')"
|
|
243
243
|
if [[ "$cur_prefix" == "$HOME/.npm-global" ]]; then
|
|
244
|
+
# ワンライナー (bash -c) は非ログイン非対話で profile が読まれないため、
|
|
245
|
+
# 既存 prefix の再セットアップ時に $HOME/.npm-global/bin が PATH に乗らず
|
|
246
|
+
# 後段の `hub-agent` / `claude` 呼び出しが command not found になる事故があった。
|
|
247
|
+
# 実行中シェルの PATH を毎回明示的に整える。
|
|
248
|
+
export PATH="$HOME/.npm-global/bin:$PATH"
|
|
244
249
|
color_ok "npm global prefix は既に $HOME/.npm-global"
|
|
245
250
|
return 0
|
|
246
251
|
fi
|