Skip to content

Commit e7884ed

Browse files
author
Dmitry Shibanov
committed
fix building
1 parent 20646b8 commit e7884ed

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

dist/index.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -6953,9 +6953,8 @@ function getGo(versionSpec, stable, auth) {
69536953
//
69546954
try {
69556955
info = yield getInfoFromManifest(makeSemver(versionSpec), stable, auth);
6956-
console.log(`info is ${info}`);
69576956
if (info) {
6958-
downloadPath = yield installGoVersion(info, auth);
6957+
downloadPath = yield installGoVersion(info, auth, undefined);
69596958
}
69606959
else {
69616960
console.log('Not found in manifest. Falling back to download directly from Go');
@@ -6981,7 +6980,7 @@ function getGo(versionSpec, stable, auth) {
69816980
throw new Error(`Unable to find Go version '${versionSpec}' for platform ${osPlat} and architecture ${osArch}.`);
69826981
}
69836982
try {
6984-
downloadPath = yield installGoVersion(info, undefined);
6983+
downloadPath = yield installGoVersion(info, undefined, 'go');
69856984
}
69866985
catch (err) {
69876986
throw new Error(`Failed to download version ${versionSpec}: ${err}`);
@@ -6991,12 +6990,12 @@ function getGo(versionSpec, stable, auth) {
69916990
});
69926991
}
69936992
exports.getGo = getGo;
6994-
function installGoVersion(info, auth) {
6993+
function installGoVersion(info, auth, subDir) {
69956994
return __awaiter(this, void 0, void 0, function* () {
69966995
console.log(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`);
69976996
const downloadPath = yield tc.downloadTool(info.downloadUrl, undefined, auth);
69986997
console.log('Extracting Go...');
6999-
const extPath = yield extractGoArchive(downloadPath);
6998+
let extPath = yield extractGoArchive(downloadPath);
70006999
console.log('Adding to the cache ...');
70017000
return yield tc.cacheDir(extPath, 'go', makeSemver(info.resolvedVersion));
70027001
});

src/installer.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ export async function getGo(
5151
//
5252
try {
5353
info = await getInfoFromManifest(makeSemver(versionSpec), stable, auth);
54-
console.log(`info is ${info}`);
5554
if (info) {
56-
downloadPath = await installGoVersion(info, auth);
55+
downloadPath = await installGoVersion(info, auth, undefined);
5756
} else {
5857
console.log(
5958
'Not found in manifest. Falling back to download directly from Go'
@@ -86,7 +85,7 @@ export async function getGo(
8685
}
8786

8887
try {
89-
downloadPath = await installGoVersion(info, undefined);
88+
downloadPath = await installGoVersion(info, undefined, 'go');
9089
} catch (err) {
9190
throw new Error(`Failed to download version ${versionSpec}: ${err}`);
9291
}
@@ -97,13 +96,14 @@ export async function getGo(
9796

9897
async function installGoVersion(
9998
info: IGoVersionInfo,
100-
auth: string | undefined
99+
auth: string | undefined,
100+
subDir: string | undefined
101101
): Promise<string> {
102102
console.log(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`);
103103
const downloadPath = await tc.downloadTool(info.downloadUrl, undefined, auth);
104104

105105
console.log('Extracting Go...');
106-
const extPath = await extractGoArchive(downloadPath);
106+
let extPath = await extractGoArchive(downloadPath);
107107

108108
console.log('Adding to the cache ...');
109109
return await tc.cacheDir(extPath, 'go', makeSemver(info.resolvedVersion));

0 commit comments

Comments
 (0)