Display warning message when trying to run unexisting suite.

This commit is contained in:
Clement Michaud 2019-03-02 22:09:51 +01:00
parent 716ae9d378
commit b3202976f2

View File

@ -3,6 +3,7 @@
var program = require('commander');
var spawn = require('child_process').spawn;
var fs = require('fs');
var ListSuites = require('./utils/ListSuites');
let suite;
@ -16,6 +17,11 @@ if (!suite) {
program.help();
}
if (ListSuites().indexOf(suite) == -1) {
console.log("[WARNING] This suite does not exist. Use 'list' command to check the existing suites.");
process.exit(1);
}
const ENVIRONMENT_FILENAME = '.suite';
let runEnvProcess;