Skip to content

Commit 14c489a

Browse files
format flag suggestion message
Signed-off-by: Samson Olawoyin <[email protected]>
1 parent 081bb2c commit 14c489a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ export const run = async () => {
2525
native: 'app'
2626
}
2727
});
28-
28+
2929
//Check the passed flags when installing Nightwatch and then suggest when undefined flag is been found.
3030
if (argv[0] !== undefined) {
3131
if ((argv[0] !== '--mobile') && (String(argv[0]) !== '--generate-config')) {
3232
const nightwatchFlags = ['--mobile', '--generate-config'];
3333
const checkFlags = didYouMean(argv[0], nightwatchFlags);
34-
35-
Logger.error(colors.red(`Did you mean flag ${checkFlags['winner']}`));
34+
const msg = colors.red(`Flag ${argv[0]} is not a valid flag, did you mean`) + colors.green(` flag ${checkFlags['winner']}`);
35+
Logger.error(msg);
3636

3737
// terminate Nightwatch setup since flag does not have definition
3838
process.exit(0);

0 commit comments

Comments
 (0)