Skip to content

Commit 8d927f1

Browse files
committed
fix: script.start with missing file
Fixes #2258 The issue was that the scripts couldn't be found, so it was just trying to repeatedly read it from scripts.start. Now if nodemon is in the scripts.start command it exits out the logic.
1 parent 9c966c1 commit 8d927f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/config/exec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ function execFromPackage() {
2525
}
2626

2727
if (pkg.scripts && pkg.scripts.start) {
28+
const parts = pkg.scripts.start.split(' ');
29+
30+
// fixes a loop issue where the script repeats over and over #2258
31+
if (parts.includes('nodemon')) {
32+
return null;
33+
}
2834
return { exec: pkg.scripts.start };
2935
}
3036
} catch (e) {}

0 commit comments

Comments
 (0)