Skip to content

Commit

Permalink
fix(toolkit): improve processing of the --force flag
Browse files Browse the repository at this point in the history
  • Loading branch information
aesedepece committed May 18, 2023
1 parent e224b64 commit 92dd7e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/bin/toolkit.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,15 @@ const toolkitDownloadName = guessToolkitDownloadName(platform, arch)
const toolkitFileName = guessToolkitFileName(platform, arch)
const toolkitBinPath = guessToolkitBinPath(toolkitDirPath, platform, arch)
const toolkitIsDownloaded = checkToolkitIsDownloaded(toolkitBinPath);
const force = args.indexOf('--force') >= 2

// Process `--force` flag
let force;
let forceIndex = args.indexOf('--force');
if (forceIndex >= 2) {
// If the `--force` flag is found, process it, but remove it from args so it doesn't get passed down to the binary
force = args[forceIndex]
args.splice(forceIndex, 1)
}

/*
Settings composition
Expand Down

0 comments on commit 92dd7e6

Please sign in to comment.