Skip to content

Commit

Permalink
fix: pnpm is already installed in the current workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed May 30, 2022
1 parent 5cadee9 commit 74c7dae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/src/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,12 @@ export namespace ESLint {
pnpm: {
cache: undefined,
get(): string {
const pnpmPath = execSync('pnpm root -g').toString().trim();
let pnpmPath: string;
try {
pnpmPath = execSync('pnpm root -g').toString().trim();
} catch {
pnpmPath = execSync('pnpm root').toString().trim();
}
return pnpmPath;
}
}
Expand Down

0 comments on commit 74c7dae

Please sign in to comment.