Skip to content

Commit

Permalink
Throw warning for unsupported runtimes, e.g. Node < 6 (#4839)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth committed Jan 15, 2018
1 parent 2ccbb6b commit a70f1a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/cake
@@ -1,5 +1,12 @@
#!/usr/bin/env node

try {
new Function('var {a} = {a: 1}')();
} catch (error) {
console.error('Your JavaScript runtime does not support some features used by the cake command. Please use Node 6 or later.');
process.exit(1);
}

var path = require('path');
var fs = require('fs');

Expand Down
7 changes: 7 additions & 0 deletions bin/coffee
@@ -1,5 +1,12 @@
#!/usr/bin/env node

try {
new Function('var {a} = {a: 1}')();
} catch (error) {
console.error('Your JavaScript runtime does not support some features used by the coffee command. Please use Node 6 or later.');
process.exit(1);
}

var path = require('path');
var fs = require('fs');

Expand Down

0 comments on commit a70f1a0

Please sign in to comment.