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:
parent
0e80c99049
commit
49b287d14a
3 changed files with 5 additions and 5 deletions
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
|
@ -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
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue