13
0
Fork 0
mirror of https://github.com/jdx/mise-action.git synced 2026-06-30 16:50:45 +00:00

fix: allow wget fallback when curl is missing

io.which(tool, true) throws on a miss, so the wget branch was never reached
when curl was absent. Use the default which() behavior instead.
This commit is contained in:
Taku Kodma 2026-06-17 10:11:11 +10:00
parent 0e80c99049
commit 49b287d14a
No known key found for this signature in database
GPG key ID: 2FA149ECEAB1E16D
3 changed files with 5 additions and 5 deletions

4
dist/index.js generated vendored
View file

@ -89585,10 +89585,10 @@ async function ensureWindowsMiseShim(miseBinPath, miseShimPath, version) {
async function getDownloadTool() {
if (cachedDownloadTool)
return cachedDownloadTool;
if (await which('curl', true)) {
if (await which('curl')) {
cachedDownloadTool = 'curl';
}
else if (await which('wget', true)) {
else if (await which('wget')) {
cachedDownloadTool = 'wget';
}
else {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -455,9 +455,9 @@ async function ensureWindowsMiseShim(
async function getDownloadTool(): Promise<DownloadTool> {
if (cachedDownloadTool) return cachedDownloadTool
if (await io.which('curl', true)) {
if (await io.which('curl')) {
cachedDownloadTool = 'curl'
} else if (await io.which('wget', true)) {
} else if (await io.which('wget')) {
cachedDownloadTool = 'wget'
} else {
throw new Error('Neither curl nor wget is available to download mise')