mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
If generator fails because NPM is too old, exit with nonzero status code
This commit is contained in:
@@ -186,7 +186,7 @@ function assertNpmVersionIsAtLeast(minVersion: string) {
|
||||
const runningVersion = execSync('npm -v').toString();
|
||||
if (!semver.gte(runningVersion, minVersion, /* loose */ true)) {
|
||||
console.error(`This generator requires NPM version ${minVersion} or later. You are running NPM version ${runningVersion}`);
|
||||
process.exit(0);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user