fixup! fix(test): Fix execution for fake wrangler installation

This commit is contained in:
Peter Bacon Darwin 2024-05-06 14:48:16 +01:00
parent afaec62104
commit 109508e12c
2 changed files with 13 additions and 5 deletions

View file

@ -114,16 +114,25 @@ async function installWrangler() {
);
}
if (!config.didUserProvideWranglerVersion && installedVersion) {
info(`✅ No wrangler version specified, using pre-installed wrangler version ${installedVersion}`, true);
info(
`✅ No wrangler version specified, using pre-installed wrangler version ${installedVersion}`,
true,
);
endGroup();
return;
}
if (config.didUserProvideWranglerVersion && installedVersionSatisfiesRequirement) {
if (
config.didUserProvideWranglerVersion &&
installedVersionSatisfiesRequirement
) {
info(`✅ Using Wrangler ${installedVersion}`, true);
endGroup();
return;
}
info('⚠️ Wrangler not found or version is incompatible. Installing...', true);
info(
"⚠️ Wrangler not found or version is incompatible. Installing...",
true,
);
} catch (error) {
debug(`Error checking Wrangler version: ${error}`);
info(

View file

@ -7,8 +7,7 @@ switch (command) {
case "--version":
console.log(`
wrangler 1.1.1 (update available 1.2.3)
------------------------------------------`
);
------------------------------------------`);
process.exit(0);
case "action-test":
console.log("Test successful.");