Skip to content

Commit ed66875

Browse files
committed
handle 'make: command not found'
1 parent 556bd93 commit ed66875

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/install.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ function make(fullPath) {
6464
make.stdout.on('data', data => console.log(data.toString()));
6565
make.stderr.on('data', data => console.error(data.toString()));
6666

67+
make.on('error', error => {
68+
console.log('An error has occurred: ' + error.message);
69+
console.log('Ensure make is installed - on debian: sudo apt install build-essential');
70+
reject(error);
71+
})
72+
6773
make.on('exit', code => {
6874
if (code) {
6975
console.error('make exited with code ' + code.toString());
@@ -94,7 +100,7 @@ async function main() {
94100

95101
main()
96102
.then(() => console.log('done'))
97-
.catch(err => {
98-
console.log(err);
103+
.catch(error => {
104+
console.log(error.message || error);
99105
process.exit(1);
100-
});
106+
});

0 commit comments

Comments
 (0)