From 2adb48172bb0b9a4175ae65d5ad76e5a9d2e2394 Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Wed, 24 Mar 2021 16:05:39 +0300 Subject: [PATCH] fix(cli): fix env options resolution --- src/main/ts/cli.ts | 10 +++++----- src/main/ts/stages.ts | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/ts/cli.ts b/src/main/ts/cli.ts index 4a5376ae..d8e86002 100644 --- a/src/main/ts/cli.ts +++ b/src/main/ts/cli.ts @@ -16,18 +16,18 @@ const flags = new Command() .default(env.YAF_AUDIT_LEVEL), ) .option( - '--dry-run', + '--dry-run [bool]', 'Get an idea of what audit fix will do', env.YAF_DRY_RUN_FORCE, ) .option( - '--force', + '--force [bool]', 'Have audit fix install semver-major updates to toplevel dependencies, not just semver-compatible ones', env.YAF_FORCE, ) .option('--loglevel [level]', 'Set custom log level', env.YAF_LOGLEVEL) .option( - '--legacy-peer-deps', + '--legacy-peer-deps [bool]', 'Accept an incorrect (potentially broken) deps resolution', env.YAF_LEGACY_PEER_DEPS, ) @@ -50,9 +50,9 @@ const flags = new Command() env.YAF_PACKAGE_LOCK_ONLY, ) .option('--registry [registry]', 'Custom registry url', env.YAF_REGISTRY) - .option('--silent', 'Disable log output', env.YAF_SILENT) + .option('--silent [bool]', 'Disable log output', env.YAF_SILENT) .option('--temp [dir]', 'Directory for temporary assets') - .option('--verbose', 'Switch log level to verbose/debug', env.YAF_VERBOSE) + .option('--verbose [bool]', 'Switch log level to verbose/debug', env.YAF_VERBOSE) .allowUnknownOption() .parse(process.argv) .opts() diff --git a/src/main/ts/stages.ts b/src/main/ts/stages.ts index 550c3420..0979f6cc 100644 --- a/src/main/ts/stages.ts +++ b/src/main/ts/stages.ts @@ -52,6 +52,7 @@ export const printRuntimeDigest: TCallback = ({ yarnAuditFixVersion, temp, cwd, + flags }, undefined, 2,