mirror of
https://github.com/actions/setup-node
synced 2024-12-22 21:22:42 +00:00
Initialize cache variable closer to usage
This commit is contained in:
parent
ee36e8b5c0
commit
7d0203234e
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,6 @@ export async function run() {
|
|||
const version = resolveVersionInput();
|
||||
|
||||
let arch = core.getInput('architecture');
|
||||
const cache = core.getInput('cache');
|
||||
|
||||
// if architecture supplied but node-version is not
|
||||
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
|
||||
|
@ -60,6 +59,7 @@ export async function run() {
|
|||
auth.configAuthentication(registryUrl, alwaysAuth);
|
||||
}
|
||||
|
||||
const cache = core.getInput('cache');
|
||||
if (cache && isCacheFeatureAvailable()) {
|
||||
core.saveState(State.CachePackageManager, cache);
|
||||
const cacheDependencyPath = core.getInput('cache-dependency-path');
|
||||
|
|
Loading…
Reference in a new issue