diff --git a/src/packages/cli/src/args.ts b/src/packages/cli/src/args.ts index f76f0ccc03..fcbe33acbd 100644 --- a/src/packages/cli/src/args.ts +++ b/src/packages/cli/src/args.ts @@ -281,9 +281,17 @@ export default function ( } ) .version(false); + }, + function () { + // this handler executes when `ganache instances` is called without a subcommand + const command = chalk`{hex("${TruffleColors.porsche}") ganache instances}`; + console.log(`Missing subcommand for ${command}.`); + console.log(); + yargs.showHelp(); + yargs.exit(1, new Error("No subcommand provided")); } ) - .showHelpOnFail(false, "Specify -? or --help for available options") + .showHelpOnFail(false) .alias("help", "?") .wrap(wrapWidth) .version(version);