Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit dae6249

Browse files
committed
Better error reporting
1 parent cb80edd commit dae6249

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/build.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,12 @@ var gypOptions = {
100100
target: argv.target,
101101
debug: argv.debug
102102
};
103-
104-
if (Constants.ModuleVersions[argv.modulesVersion][0] === Constants.Runtimes.ELECTRON) {
103+
var ModuleDetails = Constants.ModuleVersions[argv.modulesVersion];
104+
if (!ModuleDetails) {
105+
console.error('Unknown Node Modules Version: ' + argv.modulesVersion);
106+
process.exit(1);
107+
}
108+
if (ModuleDetails[0] === Constants.Runtimes.ELECTRON) {
105109
gypOptions['dist-url'] = 'https://atom.io/download/electron';
106110
}
107111

0 commit comments

Comments
 (0)