Skip to content

runConfigCommand

runConfigCommand(toolName, root, argv, io): Promise<number>

<tool> config <sub> …. root is the resolved project root. Returns the exit code.

EXIT CODES, per [[S-0015-standalone-cli-shape]]. 0 succeeded. 2 means the command cannot be run as typed — an unknown subcommand or option, a wrong argument count, contradictory flags, an unknown setting name, a value of the wrong type for its setting. Every one of those is decided from the argument list and the static schema alone, with no file involved, so re-running it can only produce the same answer. 1 means a well-formed command that FAILED: a file that will not parse, a key that is not set where you asked to unset it, a get that found nothing.

The split matters because a script can act on it — 2 means fix the command, 1 means look at the state.

ParameterType
toolNamestring
rootstring
argvstring[]
ioConfigCommandIO

Promise<number>