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) { 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(); endGroup();
return; return;
} }
if (config.didUserProvideWranglerVersion && installedVersionSatisfiesRequirement) { if (
config.didUserProvideWranglerVersion &&
installedVersionSatisfiesRequirement
) {
info(`✅ Using Wrangler ${installedVersion}`, true); info(`✅ Using Wrangler ${installedVersion}`, true);
endGroup(); endGroup();
return; return;
} }
info('⚠️ Wrangler not found or version is incompatible. Installing...', true); info(
"⚠️ Wrangler not found or version is incompatible. Installing...",
true,
);
} catch (error) { } catch (error) {
debug(`Error checking Wrangler version: ${error}`); debug(`Error checking Wrangler version: ${error}`);
info( info(

View file

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