Skip to content

Commit

Permalink
feat: isolate skipVersionCheck param
Browse files Browse the repository at this point in the history
  • Loading branch information
tczhao committed Nov 12, 2024
1 parent 7473171 commit 3ecedd1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions bin/local-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,23 @@ function installPackages(packages, extraArgs, azureArtifacts) {
}
}

async function run(packageName, azureArtifacts, bypassSafetyCheck, extraArgs, channel, snapshotInstall) {
async function run(
packageName,
azureArtifacts,
bypassSafetyCheck,
extraArgs,
channel,
snapshotInstall,
skipVersionCheck
) {
const packagesMap = getAllPackagesMap();
const installedPackages = await getInstalledPackages();

const packagesToInstall = getPackagesToInstall(
packageName,
packagesMap,
installedPackages,
bypassSafetyCheck,
skipVersionCheck,
snapshotInstall
);
console.log(
Expand Down Expand Up @@ -304,8 +312,10 @@ const channel = process.argv[7];
// snapshotInstall install package regardless of package version
// It respects bypassSafetyCheck, and added a -snapshot suffix to the version
const snapshotInstallString = process.argv[8];
const skipVersionCheckString = process.argv[9];

const bypassSafetyCheck = bypassSafetyCheckString === "true";
const snapshotInstall = snapshotInstallString === "true";
const skipVersionCheck = skipVersionCheckString === "true";

run(packageName, azureArtifacts, bypassSafetyCheck, extraArgs, channel, snapshotInstall);
run(packageName, azureArtifacts, bypassSafetyCheck, extraArgs, channel, snapshotInstall, skipVersionCheck);

0 comments on commit 3ecedd1

Please sign in to comment.