Skip to content

Commit 23bb0d3

Browse files
committed
fixup: allow passing CLI args as env vars, add verbose debug mode directly
1 parent 4c756a1 commit 23bb0d3

File tree

1 file changed

+6
-1
lines changed
  • packages/mongodb-runner/src

1 file changed

+6
-1
lines changed

packages/mongodb-runner/src/cli.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ import type { MongoClientOptions } from 'mongodb';
7575
describe: 'Configure OIDC authentication on the server',
7676
})
7777
.config()
78+
.env('MONGODB_RUNNER')
7879
.option('debug', { type: 'boolean', describe: 'Enable debug output' })
80+
.option('verbose', { type: 'boolean', describe: 'Enable verbose output' })
7981
.command('start', 'Start a MongoDB instance')
8082
.command('stop', 'Stop a MongoDB instance')
8183
.command('prune', 'Clean up metadata for any dead MongoDB instances')
@@ -87,9 +89,12 @@ import type { MongoClientOptions } from 'mongodb';
8789
.demandCommand(1, 'A command needs to be provided')
8890
.help().argv;
8991
const [command, ...args] = argv._.map(String);
90-
if (argv.debug) {
92+
if (argv.debug || argv.verbose) {
9193
createDebug.enable('mongodb-runner');
9294
}
95+
if (argv.verbose) {
96+
createDebug.enable('mongodb-runner:*');
97+
}
9398

9499
if (argv.oidc && process.platform !== 'linux') {
95100
console.warn(

0 commit comments

Comments
 (0)