mirror of
https://github.com/actions/setup-go.git
synced 2024-11-15 11:54:34 +08:00
fix cache dir issue
This commit is contained in:
parent
2096a2c66a
commit
655555d319
7
.github/workflows/versions.yml
vendored
7
.github/workflows/versions.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
go-version: ^1.13.6
|
go-version: ^1.13.6
|
||||||
|
|
||||||
- name: validate version
|
- name: validate version
|
||||||
run: go version | grep "go1.13."
|
run: go version | grep "go1."
|
||||||
|
|
||||||
- name: setup-go 1.13
|
- name: setup-go 1.13
|
||||||
uses: ./
|
uses: ./
|
||||||
@ -42,3 +42,8 @@ jobs:
|
|||||||
|
|
||||||
- name: validate version
|
- name: validate version
|
||||||
run: go version | grep "go1.12.9"
|
run: go version | grep "go1.12.9"
|
||||||
|
|
||||||
|
- name: show cache
|
||||||
|
run: |
|
||||||
|
echo go versions in tool cache:
|
||||||
|
echo $(ls $RUNNER_TOOL_CACHE/go)
|
||||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -4601,7 +4601,7 @@ function downloadGo(versionSpec, stable) {
|
|||||||
core_1.debug(`extracted to ${extPath}`);
|
core_1.debug(`extracted to ${extPath}`);
|
||||||
// extracts with a root folder that matches the fileName downloaded
|
// extracts with a root folder that matches the fileName downloaded
|
||||||
const toolRoot = path.join(extPath, 'go');
|
const toolRoot = path.join(extPath, 'go');
|
||||||
toolPath = yield tc.cacheDir(toolRoot, 'go', versionSpec);
|
toolPath = yield tc.cacheDir(toolRoot, 'go', match.version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
@ -33,7 +33,7 @@ export async function downloadGo(
|
|||||||
|
|
||||||
// extracts with a root folder that matches the fileName downloaded
|
// extracts with a root folder that matches the fileName downloaded
|
||||||
const toolRoot = path.join(extPath, 'go');
|
const toolRoot = path.join(extPath, 'go');
|
||||||
toolPath = await tc.cacheDir(toolRoot, 'go', versionSpec);
|
toolPath = await tc.cacheDir(toolRoot, 'go', match.version);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Failed to download version ${versionSpec}: ${error}`);
|
throw new Error(`Failed to download version ${versionSpec}: ${error}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user