Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Sep 24, 2022
1 parent fd6a0fb commit 415373e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/webpack-cli/src/webpack-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,15 @@ class WebpackCLI implements IWebpackCLI {
}

// Respect NODE_PATH environment variable
if (
process.env.NODE_PATH &&
fs.statSync(path.join(process.env.NODE_PATH, packageName)).isDirectory()
) {
return true;
try {
if (
process.env.NODE_PATH &&
fs.statSync(path.join(process.env.NODE_PATH, packageName)).isDirectory()
) {
return true;
}
} catch (_error) {
// Nothing
}

let dir = __dirname;
Expand Down

0 comments on commit 415373e

Please sign in to comment.