diff --git a/src/installer.ts b/src/installer.ts index 3897deb..d924eae 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -8,6 +8,7 @@ import fs from 'fs'; import os from 'os'; type InstallationType = 'dist' | 'manifest'; +export type StableAliasType = 'stable' | 'oldstable'; export interface IGoVersionFile { filename: string; @@ -175,7 +176,7 @@ export async function extractGoArchive(archivePath: string): Promise { } export async function getInfoFromManifest( - versionSpec: string, + versionSpec: string | StableAliasType, stable: boolean, auth: string | undefined, arch = os.arch() diff --git a/src/main.ts b/src/main.ts index 9c2f398..012088f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,7 +4,7 @@ import * as installer from './installer'; import * as semver from 'semver'; import path from 'path'; import {restoreCache} from './cache-restore'; -import {isGhes, isCacheFeatureAvailable} from './cache-utils'; +import {isCacheFeatureAvailable} from './cache-utils'; import cp from 'child_process'; import fs from 'fs'; import os from 'os'; @@ -150,7 +150,7 @@ function resolveVersionInput(): string { } async function resolveStableVersionInput( - versionSpec: string, + versionSpec: installer.StableAliasType, auth: string | undefined, arch = os.arch() ): Promise {