mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-20 05:11:48 +00:00
fix(update): harden install verification flow
This commit is contained in:
1 parent
59e04cb56f
commit
a4496ff1d9
3 files changed
+149
-139
No files matched your search
@@ -123,6 +123,12 @@ function inferInstallFromPath(
|
||||
normalizedPath.includes('/global/') &&
|
||||
normalizedPath.includes('/node_modules/@kaitranntt/ccs')
|
||||
) {
|
||||
const pnpmFlatMatch = normalizedPath.match(/\/global\/([^/]+)\/node_modules\/@kaitranntt\/ccs/);
|
||||
|
||||
if (!pnpmFlatMatch || pnpmFlatMatch[1] === 'lib') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
manager: 'pnpm',
|
||||
prefix: getPrefixBeforeMarker(targetPath, `${path.sep}global${path.sep}`),
|
||||
|
||||
Reference in new issue
Block a user