Skip to content

Throw warning for unsupported runtimes, e.g. Node < 6 #4839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bin/cake
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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