What happened?
pi update fails for a valid global pnpm install because the package manager ownership check compares pnpm's root (something like
~/Library/pnpm/global/v11) with the actual resolved path after expanding the symlink (something like ~/Library/pnpm/store/...).
this is because of a node fs.realpathSync() call in isManagedByGlobalPackageManager(), which, well... resolves the real path of the symlinked pi package.
the simplest fix would probably just be avoiding resolving the symlink in the first place.
related files
packages/coding-agent/src/config.ts
isManagedByGlobalPackageManager()
normalizeExistingPathForComparison()
getGlobalPackageRoots()
Steps to reproduce
pnpm add -g @earendil-works/pi-coding-agent (ideally in an isolated environment)
pi update
Expected behavior
pi update correctly identifies pnpm managed installation and runs pnpm add -g @earendil-works/pi-coding-agent@latest (or something like that)
Version
0.75.0
What happened?
pi updatefails for a valid global pnpm install because the package manager ownership check compares pnpm's root (something like~/Library/pnpm/global/v11) with the actual resolved path after expanding the symlink (something like~/Library/pnpm/store/...).this is because of a node
fs.realpathSync()call inisManagedByGlobalPackageManager(), which, well... resolves the real path of the symlinked pi package.the simplest fix would probably just be avoiding resolving the symlink in the first place.
related files
packages/coding-agent/src/config.tsisManagedByGlobalPackageManager()normalizeExistingPathForComparison()getGlobalPackageRoots()Steps to reproduce
pnpm add -g @earendil-works/pi-coding-agent(ideally in an isolated environment)pi updateExpected behavior
pi updatecorrectly identifies pnpm managed installation and runspnpm add -g @earendil-works/pi-coding-agent@latest(or something like that)Version
0.75.0