Skip to content

Commit 1455834

Browse files
Correctly parse CLI arguments (#3972)
Was fixed in #3949 (in the `simplify` branch). Move it here to make testing easier.
1 parent d5d7a5a commit 1455834

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

benchmark/benchmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async function runBenchmark (config: Config) {
141141
function getConfig (): Config {
142142
const base = baseConfig;
143143

144-
const args = yargs(hideBin(process.argv)) as unknown as Record<string, unknown>;
144+
const args = yargs(hideBin(process.argv)).argv as Record<string, unknown>;
145145

146146
if (typeof args.testFunction === 'string') {
147147
baseConfig.options.testFunction = args.testFunction as ConfigOptions['testFunction'];

tests/helper/args.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import yargs from 'yargs';
22
import { hideBin } from 'yargs/helpers';
33

4-
const args = yargs(hideBin(process.argv)) as {
4+
const args = yargs(hideBin(process.argv)).argv as {
55
language?: string | string[];
66
update?: boolean;
77
};

0 commit comments

Comments
 (0)