hsluoyz commented on PR #231:
URL: https://github.com/apache/casbin-gateway/pull/231#issuecomment-5728853321

   Thanks — the bug is real, and I confirmed it here: `npm uninstall -g <pkg>` 
against a prefix that doesn't hold the package prints `up to date` and exits 0, 
so the page reported the agent gone while it was still installed. I've landed a 
variant of your fix in c72a3f4ce85531f2cb9a9c578344295f04509d14 with a few 
changes: the prefix is only derived when the path is really an npm global root 
(`<prefix>/node_modules` on Windows, `<prefix>/lib/node_modules` elsewhere), so 
a pnpm store or npx cache entry falls back to the plain command instead of 
getting a prefix npm can't act on; a scan that fails or times out no longer 
turns a successful uninstall into a reported failure; and the failure toast now 
has its own string for upgrade and downgrade as well as uninstall. The npm 
*upgrade* path still has the same multi-prefix problem — happy to look at a PR 
for that one.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to