diff --git a/grace-shell/src/main/groovy/org/grails/cli/GrailsCli.groovy b/grace-shell/src/main/groovy/org/grails/cli/GrailsCli.groovy index af0c1a7fa9..1f5fa65959 100644 --- a/grace-shell/src/main/groovy/org/grails/cli/GrailsCli.groovy +++ b/grace-shell/src/main/groovy/org/grails/cli/GrailsCli.groovy @@ -256,7 +256,7 @@ class GrailsCli { exit(0) } - if (mainCommandLine.hasOption(CommandLine.HELP_ARGUMENT) || mainCommandLine.hasOption('h')) { + if (!mainCommandLine.commandName && (mainCommandLine.hasOption(CommandLine.HELP_ARGUMENT) || mainCommandLine.hasOption('h'))) { profileRepository = createMavenProfileRepository() Command cmd = CommandRegistry.getCommand('help', profileRepository) cmd.handle(createExecutionContext(mainCommandLine))