Compare commits

...

4 Commits

Author SHA1 Message Date
Trivikram Kamat
de262f3bda
Merge 325751ad7d into 0a44ba7841 2024-09-19 21:47:05 +05:30
William Entriken
0a44ba7841
Correct version string (#1124) 2024-09-19 08:53:38 -05:00
Trivikram Kamat
325751ad7d chore: npm run format 2023-11-11 06:57:39 +00:00
Kamat, Trivikram
7d0203234e Initialize cache variable closer to usage 2023-11-10 16:34:36 +00:00
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ See [action.yml](action.yml)
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
# Version Spec of the version to use in SemVer notation. # Version Spec of the version to use in SemVer notation.
# It also admits such aliases as lts, latest, nightly and canary builds # It also admits such aliases as lts/*, latest, nightly and canary builds
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node # Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-version: '' node-version: ''

2
dist/setup/index.js vendored
View File

@ -94433,7 +94433,6 @@ function run() {
// //
const version = resolveVersionInput(); const version = resolveVersionInput();
let arch = core.getInput('architecture'); let arch = core.getInput('architecture');
const cache = core.getInput('cache');
// if architecture supplied but node-version is not // 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. // if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
if (arch && !version) { if (arch && !version) {
@ -94463,6 +94462,7 @@ function run() {
if (registryUrl) { if (registryUrl) {
auth.configAuthentication(registryUrl, alwaysAuth); auth.configAuthentication(registryUrl, alwaysAuth);
} }
const cache = core.getInput('cache');
if (cache && (0, cache_utils_1.isCacheFeatureAvailable)()) { if (cache && (0, cache_utils_1.isCacheFeatureAvailable)()) {
core.saveState(constants_1.State.CachePackageManager, cache); core.saveState(constants_1.State.CachePackageManager, cache);
const cacheDependencyPath = core.getInput('cache-dependency-path'); const cacheDependencyPath = core.getInput('cache-dependency-path');

View File

@ -19,7 +19,6 @@ export async function run() {
const version = resolveVersionInput(); const version = resolveVersionInput();
let arch = core.getInput('architecture'); let arch = core.getInput('architecture');
const cache = core.getInput('cache');
// if architecture supplied but node-version is not // 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. // if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
@ -59,6 +58,7 @@ export async function run() {
auth.configAuthentication(registryUrl, alwaysAuth); auth.configAuthentication(registryUrl, alwaysAuth);
} }
const cache = core.getInput('cache');
if (cache && isCacheFeatureAvailable()) { if (cache && isCacheFeatureAvailable()) {
core.saveState(State.CachePackageManager, cache); core.saveState(State.CachePackageManager, cache);
const cacheDependencyPath = core.getInput('cache-dependency-path'); const cacheDependencyPath = core.getInput('cache-dependency-path');