Skip to content

Commit

Permalink
fixup! fix(test): Fix execution for fake wrangler installation
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed May 6, 2024
1 parent afaec62 commit 109508e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
15 changes: 12 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions test/pre-installed-wrangler/mock_packages/wrangler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 109508e

Please sign in to comment.