Skip to content

Commit

Permalink
Fix broken Android object configuration object.
Browse files Browse the repository at this point in the history
This fixes the internal configuration object for android.
The old solution created an array with objects instead of just keys on the object.
  • Loading branch information
soulgalore committed Sep 22, 2024
1 parent 3ae5dca commit 45c8c74
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ function validateInput(argv) {
}

export async function parseCommandLine() {
let yargsInstance = yargs(hideBin(process.argv));
let argvFix = process.argv.map(arg =>
arg === '--android' ? '--android.enabled' : arg
);

let yargsInstance = yargs(hideBin(argvFix));
let parsed = yargsInstance
.parserConfiguration({
'camel-case-expansion': false,
Expand Down Expand Up @@ -2132,13 +2136,6 @@ export async function parseCommandLine() {
const aliases = parsed.getOptions().alias,
argv = parsed.argv;

// hack to keep backward compability to --android
if (
argv.android === true ||
(argv.browsertime && argv.browsertime.android === true)
) {
set(argv, 'browsertime.android.enabled', true);
}
// aliases are long options -> short option
const aliasLookup = reduce(
aliases,
Expand Down

0 comments on commit 45c8c74

Please sign in to comment.