mirror of
https://github.com/actions/setup-go.git
synced 2025-05-04 14:14:34 +00:00
Add Go bin if go-version input is empty (#351)
This commit is contained in:
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
@ -63605,13 +63605,13 @@ function run() {
|
||||
core.info('Setting GOROOT for Go version < 1.9');
|
||||
core.exportVariable('GOROOT', installDir);
|
||||
}
|
||||
const added = yield addBinToPath();
|
||||
core.debug(`add bin ${added}`);
|
||||
core.info(`Successfully set up Go version ${versionSpec}`);
|
||||
}
|
||||
else {
|
||||
core.info('[warning]go-version input was not specified. The action will try to use pre-installed version.');
|
||||
}
|
||||
const added = yield addBinToPath();
|
||||
core.debug(`add bin ${added}`);
|
||||
const goPath = yield io.which('go');
|
||||
const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
|
||||
if (cache && cache_utils_1.isCacheFeatureAvailable()) {
|
||||
|
Reference in New Issue
Block a user