Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Runner] Throw error on unknown option in init command
And explicitly document the advanced --trace-process-name and
--trace-process-level args.
Andrew Eisenberg committed Apr 16, 2021
1 parent 6aebd1b commit c87ee1c
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 2 additions & 3 deletions lib/runner.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/runner.js.map
11 changes: 8 additions & 3 deletions src/runner.ts
@@ -141,9 +141,14 @@ program
"Checkout path. Default is the current working directory."
)
.option("--debug", "Print more verbose output", false)
// This prevents a message like: error: unknown option '--trace-process-level'
// Remove this if commander.js starts supporting hidden options.
.allowUnknownOption()
.option(
"--trace-process-name <string>",
"(Advanced, windows-only) Inject a windows tracer of this process into a process with the given process name."
)
.option(
"--trace-process-level <number>",
"(Advanced, windows-only) Inject a windows tracer of this process into a parent process <number> levels up."
)
.action(async (cmd: InitArgs) => {
const logger = getRunnerLogger(cmd.debug);
try {

0 comments on commit c87ee1c

Please sign in to comment.