From 4ad93eed32e2075777d8e631bde5188ec8cf3cb5 Mon Sep 17 00:00:00 2001 From: Jesse Dijkstra Date: Tue, 2 Jul 2024 15:10:38 +0200 Subject: [PATCH] Check for deno-version-file before defaulting to deno-version Signed-off-by: Jesse Dijkstra --- action.yml | 1 - main.js | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index c300981..e768580 100644 --- a/action.yml +++ b/action.yml @@ -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: diff --git a/main.js b/main.js index 08ceb39..10a1ecd 100644 --- a/main.js +++ b/main.js @@ -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) {