cc-pets 1.2.2 → 1.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-pets",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "A native macOS desktop pet for Codex CLI and Claude Code",
5
5
  "author": "wangxinyusqn",
6
6
  "license": "MIT",
@@ -65,8 +65,11 @@ if ! grep -Fq "${SHIM_START_MARKER}" "${SHELL_RC}" 2>/dev/null; then
65
65
  print ""
66
66
  print "${SHIM_START_MARKER}"
67
67
  # 追加在 .zshrc 末尾,保证排在 nvm 之类会前置 PATH 的初始化之后;
68
- # 含入判断让重复 source .zshrc 不会把同一个目录堆进 PATH。
69
- print "[[ \":\${PATH}:\" == *\":${SHIM_DIR}:\"* ]] || export PATH=${(q)SHIM_DIR}\":\${PATH}\""
68
+ # path 的唯一属性会去掉旧位置的重复项,然后每次 source 都把 shim
69
+ # 重新放到首位。不能只判断“PATH 里已经存在”:终端恢复旧环境时,
70
+ # shim 可能在 nvm 后面,导致 codex / claude 绕过包装器。
71
+ print "typeset -U path"
72
+ print "path=(${(q)SHIM_DIR} \$path)"
70
73
  print "${SHIM_END_MARKER}"
71
74
  } >> "${SHELL_RC}"
72
75
  fi