Check return code

because sometimes babel can just be completely broken
pull/21833/head
David Baker 2016-10-12 17:45:13 +01:00
parent eb9f884b53
commit 12ef1cfd9d
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ var exec = require('child_process').exec;
// 5.
exec("babel -V", function (error, stdout, stderr) {
if (parseInt(stdout.substr(0,1), 10) < 6) {
if ((error && error.code) || parseInt(stdout.substr(0,1), 10) < 6) {
console.log("\033[31m\033[1m"+
'*****************************************\n'+
'* matrix-react-sdk has moved to babel 6 *\n'+