From b3202976f2bba30bef65399eeeff7702ad5974f8 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Sat, 2 Mar 2019 22:09:51 +0100 Subject: [PATCH] Display warning message when trying to run unexisting suite. --- scripts/authelia-scripts-suites-start | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/authelia-scripts-suites-start b/scripts/authelia-scripts-suites-start index 1d34b9d0..1fdc85a9 100755 --- a/scripts/authelia-scripts-suites-start +++ b/scripts/authelia-scripts-suites-start @@ -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;