Skip to content

Commit

Permalink
Check for deno-version-file before defaulting to deno-version
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Dijkstra <[email protected]>
  • Loading branch information
jessedijkstra committed Jul 2, 2024
1 parent 188e7e8 commit 4ad93ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ branding:
inputs:
deno-version:
description: The Deno version to install. Can be a semver version of a stable release, "canary" for the latest canary, or the Git hash of a specific canary release.
default: "1.x"
deno-version-file:
description: File containing the Deno version to install such as .dvmrc or .tool-versions. Overridden by deno-version.
outputs:
Expand Down
4 changes: 3 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ async function main() {
try {
const denoVersionFile = core.getInput("deno-version-file");
const range = parseVersionRange(
core.getInput("deno-version") || getDenoVersionFromFile(denoVersionFile)
denoVersionFile
? getDenoVersionFromFile(denoVersionFile)
: core.getInput("deno-version")
);

if (range === null) {
Expand Down

0 comments on commit 4ad93ee

Please sign in to comment.