From 95c6e43dbe5693e6299839e07c002a1f7105ba1e Mon Sep 17 00:00:00 2001 From: jojo43 Date: Sun, 5 Jul 2020 10:52:54 +0900 Subject: [PATCH] npm run build --- dist/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 2689cf3..aacd1ca 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1432,7 +1432,13 @@ function run() { // versionSpec is optional. If supplied, install / use from the tool cache // If not supplied then problem matchers will still be setup. Useful for self-hosted. // - let versionSpec = core.getInput('go-version'); + const versionFilePath = core.getInput('go-version-from-file'); + const versionSpecFromFile = versionFilePath && + fs_1.default + .readFileSync(versionFilePath) + .toString() + .trim(); + let versionSpec = core.getInput('go-version') || versionSpecFromFile; // stable will be true unless false is the exact input // since getting unstable versions should be explicit let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';