Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize cache variable closer to usage #880

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Initialize cache variable closer to usage
  • Loading branch information
trivikr committed Nov 10, 2023
commit 7d0203234ef0f02941947d53ce3b7010a9af713d
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -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');