Skip to content

Commit

Permalink
Do not stat non-existent dir
Browse files Browse the repository at this point in the history
  • Loading branch information
andersnm committed Apr 21, 2019
1 parent dcf51c2 commit 9ce8991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/blerf/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class BuildEnumerator extends PackageEnumerator {

if (dependencyVersion.startsWith("file:")) {
const dependencyNodePath = path.join(packagePath, "node_modules", dependencyName);
if (!fs.lstatSync(dependencyNodePath).isSymbolicLink()) {
if (fs.existsSync(dependencyNodePath) && !fs.lstatSync(dependencyNodePath).isSymbolicLink()) {
console.log("blerf: recovering from npm error scenario: 'file:'-dependency exists in node_modules, but is not a symlink");
this.rimraf(dependencyNodePath);
recovered = true;
Expand Down

0 comments on commit 9ce8991

Please sign in to comment.