Skip to content

Commit

Permalink
throw error later
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbe7a committed Dec 15, 2023
1 parent 2557a40 commit 4aedaa2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion dist/post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ const determineMicromambaInstallation = (micromambaBinPath?: string, downloadMic
core.info(`Found preinstalled micromamba at ${preinstalledMicromamba}`)
}

if (downloadMicromamba === false && !preinstalledMicromamba) {
throw new Error('Could not find a pre-installed micromamba installation and `download-micromamba` is false.')
}

if (micromambaBinPath) {
core.info(`Using micromamba binary path ${micromambaBinPath}`)

Expand All @@ -130,6 +126,10 @@ const determineMicromambaInstallation = (micromambaBinPath?: string, downloadMic
}
}

if (downloadMicromamba === false && !preinstalledMicromamba) {
throw new Error('Could not find a pre-installed micromamba installation and `download-micromamba` is false.')
}

if (!downloadMicromamba && preinstalledMicromamba) {
core.info(`Using preinstalled micromamba at ${preinstalledMicromamba}`)
return { downloadMicromamba: false, micromambaBinPath: preinstalledMicromamba }
Expand Down

0 comments on commit 4aedaa2

Please sign in to comment.