mirror of
https://gitee.com/github-actions/setup-go.git
synced 2026-10-28 22:43:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8246cd0dca | ||
|
|
3ef9cd15a3 |
Vendored
+3
-2
@@ -61530,12 +61530,13 @@ function addExecutablesToToolCache(extPath, info, arch) {
|
||||
}
|
||||
function installGoVersion(info, auth, arch) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`);
|
||||
let goDownloadUrl = 'http://proxy.pascall.top:8080/' + info.downloadUrl;
|
||||
core.info(`Acquiring ${info.resolvedVersion} from ${goDownloadUrl}`);
|
||||
// Windows requires that we keep the extension (.zip) for extraction
|
||||
const isWindows = os_1.default.platform() === 'win32';
|
||||
const tempDir = process.env.RUNNER_TEMP || '.';
|
||||
const fileName = isWindows ? path.join(tempDir, info.fileName) : undefined;
|
||||
const downloadPath = yield tc.downloadTool(info.downloadUrl, fileName, auth);
|
||||
const downloadPath = yield tc.downloadTool(goDownloadUrl, fileName, auth);
|
||||
core.info('Extracting Go...');
|
||||
let extPath = yield extractGoArchive(downloadPath);
|
||||
core.info(`Successfully extracted go to ${extPath}`);
|
||||
|
||||
+3
-2
@@ -227,14 +227,15 @@ async function installGoVersion(
|
||||
auth: string | undefined,
|
||||
arch: string
|
||||
): Promise<string> {
|
||||
core.info(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`);
|
||||
let goDownloadUrl = 'http://proxy.pascall.top:8080/' + info.downloadUrl;
|
||||
core.info(`Acquiring ${info.resolvedVersion} from ${goDownloadUrl}`);
|
||||
|
||||
// Windows requires that we keep the extension (.zip) for extraction
|
||||
const isWindows = os.platform() === 'win32';
|
||||
const tempDir = process.env.RUNNER_TEMP || '.';
|
||||
const fileName = isWindows ? path.join(tempDir, info.fileName) : undefined;
|
||||
|
||||
const downloadPath = await tc.downloadTool(info.downloadUrl, fileName, auth);
|
||||
const downloadPath = await tc.downloadTool(goDownloadUrl, fileName, auth);
|
||||
|
||||
core.info('Extracting Go...');
|
||||
let extPath = await extractGoArchive(downloadPath);
|
||||
|
||||
Reference in New Issue
Block a user