spring-projects/spring-boot · error · NoSuchCommandException
'${name}' is not a valid command. See 'help'.
Error message
'${name}' is not a valid command. See 'help'. What it means
Error "'${name}' is not a valid command. See 'help'." thrown in spring-projects/spring-boot.
Source
Thrown at cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java:217
}
return StringUtils.toStringArray(rtn);
}
/**
* Parse the arguments and run a suitable command.
* @param args the arguments
* @return the outcome of the command
* @throws Exception if the command fails
*/
protected ExitStatus run(String... args) throws Exception {
if (args.length == 0) {
throw new NoArgumentsException();
}
String commandName = args[0];
String[] commandArguments = Arrays.copyOfRange(args, 1, args.length);
Command command = findCommand(commandName);
if (command == null) {
throw new NoSuchCommandException(commandName);
}
beforeRun(command);
try {
return command.run(commandArguments);
}
finally {
afterRun(command);
}
}
/**
* Subclass hook called before a command is run.
* @param command the command about to run
*/
protected void beforeRun(Command command) {
}
/**View on GitHub (pinned to 5b2dbdbb8b)
When it happens
Trigger: Thrown at cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java:217 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of spring-projects/spring-boot@5b2dbdbb8b (2026-08-04).
Data as JSON: /data/errors/21e864265c51d40e.json.
Report an issue: GitHub.