mirror of
https://codeberg.org/actions/setup-go.git
synced 2024-01-07 17:16:05 +00:00
Fix formatting
This commit is contained in:
parent
2a34c33bd7
commit
802876f7c7
|
@ -240,7 +240,7 @@ describe('setup-go', () => {
|
||||||
let toolPath = path.normalize('/cache/go/1.13.0/x64');
|
let toolPath = path.normalize('/cache/go/1.13.0/x64');
|
||||||
findSpy.mockImplementation(() => toolPath);
|
findSpy.mockImplementation(() => toolPath);
|
||||||
|
|
||||||
let vars: { [key: string]: string; } = {};
|
let vars: {[key: string]: string} = {};
|
||||||
exportVarSpy.mockImplementation((name: string, val: string) => {
|
exportVarSpy.mockImplementation((name: string, val: string) => {
|
||||||
vars[name] = val;
|
vars[name] = val;
|
||||||
});
|
});
|
||||||
|
@ -256,18 +256,17 @@ describe('setup-go', () => {
|
||||||
let toolPath = path.normalize('/cache/go/1.8.0/x64');
|
let toolPath = path.normalize('/cache/go/1.8.0/x64');
|
||||||
findSpy.mockImplementation(() => toolPath);
|
findSpy.mockImplementation(() => toolPath);
|
||||||
|
|
||||||
let vars: { [key: string]: string; } = {};
|
let vars: {[key: string]: string} = {};
|
||||||
exportVarSpy.mockImplementation((name: string, val: string) => {
|
exportVarSpy.mockImplementation((name: string, val: string) => {
|
||||||
vars[name] = val;
|
vars[name] = val;
|
||||||
});
|
});
|
||||||
|
|
||||||
await main.run();
|
await main.run();
|
||||||
expect(vars).toStrictEqual({
|
expect(vars).toStrictEqual({
|
||||||
"GOROOT": toolPath
|
GOROOT: toolPath
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it('finds a version of go already in the cache', async () => {
|
it('finds a version of go already in the cache', async () => {
|
||||||
inputs['go-version'] = '1.13.0';
|
inputs['go-version'] = '1.13.0';
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ export async function run() {
|
||||||
const version = installer.makeSemver(versionSpec);
|
const version = installer.makeSemver(versionSpec);
|
||||||
// Go versions less than 1.9 require GOROOT to be set
|
// Go versions less than 1.9 require GOROOT to be set
|
||||||
if (semver.lt(version, '1.9.0')) {
|
if (semver.lt(version, '1.9.0')) {
|
||||||
core.info("Setting GOROOT for Go version < 1.9");
|
core.info('Setting GOROOT for Go version < 1.9');
|
||||||
core.exportVariable('GOROOT', installDir);
|
core.exportVariable('GOROOT', installDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue