Skip to content

Commit

Permalink
💚 [Debug] Run npm --version command before npm config get ... com…
Browse files Browse the repository at this point in the history
…mand

Check to see if the error is caused by the `npm config get ...` command or if npm is throwing an error.
  • Loading branch information
sounisi5011 committed Jul 2, 2023
1 parent cd82128 commit 205c673
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const isDifferentPackageManagerError = (error: unknown): boolean =>
* @throws If the "pnpm config get ..." command fails, an error is thrown.
*/
async function tryNpmConfigGet(key: string): Promise<string | null> {
// ///// ↓DEBUG↓ /////
console.log(await execFileAsync('npm', ['--version']));
// ///// ↑DEBUG↑ /////
return await execFileAsync('npm', ['config', 'get', key], {
env: {
...process.env,
Expand Down

0 comments on commit 205c673

Please sign in to comment.