mirror of
https://github.com/actions/setup-go.git
synced 2025-06-30 05:03:43 +00:00
Change code according to review points
This commit is contained in:
parent
fc2e404438
commit
86d1cd689b
5 changed files with 443 additions and 47 deletions
|
@ -21,10 +21,13 @@ export async function run() {
|
|||
}
|
||||
|
||||
const cachePackages = async () => {
|
||||
const cachingFlag = core.getBooleanInput('cache');
|
||||
if (!cachingFlag) return;
|
||||
|
||||
const packageManager = core.getInput('package-manager');
|
||||
|
||||
const cacheInput = core.getInput('cache');
|
||||
if (!cacheInput) {
|
||||
return;
|
||||
}
|
||||
|
||||
const packageManager = cacheInput.toUpperCase() === 'TRUE' ? 'default' : cacheInput;
|
||||
|
||||
const state = core.getState(State.CacheMatchedKey);
|
||||
const primaryKey = core.getState(State.CachePrimaryKey);
|
||||
|
|
|
@ -24,8 +24,9 @@ export const getPackageManagerInfo = async (packageManager: string) => {
|
|||
`It's not possible to use ${packageManager}, please, check correctness of the package manager name spelling.`
|
||||
);
|
||||
}
|
||||
const obtainedPackageManager = supportedPackageManagers[packageManager]
|
||||
|
||||
return supportedPackageManagers[packageManager];
|
||||
return obtainedPackageManager;
|
||||
};
|
||||
|
||||
export const getCacheDirectoryPath = async (
|
||||
|
|
|
@ -18,7 +18,9 @@ export async function run() {
|
|||
// stable will be true unless false is the exact input
|
||||
// since getting unstable versions should be explicit
|
||||
let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
|
||||
const cache = core.getBooleanInput('cache');
|
||||
|
||||
const cacheInput = core.getInput('cache');
|
||||
const cache = cacheInput.toUpperCase() === 'TRUE' ? 'default' : cacheInput;
|
||||
|
||||
core.info(`Setup go ${stable ? 'stable' : ''} version spec ${versionSpec}`);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue