Check for deno-version-file before defaulting to deno-version
Signed-off-by: Jesse Dijkstra <mail@jessedijkstra.nl>
This commit is contained in:
parent
188e7e8452
commit
4ad93eed32
@ -7,7 +7,6 @@ branding:
|
|||||||
inputs:
|
inputs:
|
||||||
deno-version:
|
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.
|
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:
|
deno-version-file:
|
||||||
description: File containing the Deno version to install such as .dvmrc or .tool-versions. Overridden by deno-version.
|
description: File containing the Deno version to install such as .dvmrc or .tool-versions. Overridden by deno-version.
|
||||||
outputs:
|
outputs:
|
||||||
|
4
main.js
4
main.js
@ -21,7 +21,9 @@ async function main() {
|
|||||||
try {
|
try {
|
||||||
const denoVersionFile = core.getInput("deno-version-file");
|
const denoVersionFile = core.getInput("deno-version-file");
|
||||||
const range = parseVersionRange(
|
const range = parseVersionRange(
|
||||||
core.getInput("deno-version") || getDenoVersionFromFile(denoVersionFile)
|
denoVersionFile
|
||||||
|
? getDenoVersionFromFile(denoVersionFile)
|
||||||
|
: core.getInput("deno-version")
|
||||||
);
|
);
|
||||||
|
|
||||||
if (range === null) {
|
if (range === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user