Skip to content

Commit 1b970e4

Browse files
fix falling version tests
1 parent 38d335a commit 1b970e4

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

dist/cache-save/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50336,7 +50336,7 @@ function run() {
5033650336
yield cachePackages(cacheLock);
5033750337
}
5033850338
catch (error) {
50339-
core.setFailed('Failed to remove private key');
50339+
core.setFailed(error.message);
5034050340
}
5034150341
});
5034250342
}
@@ -50345,7 +50345,8 @@ const cachePackages = (packageManager) => __awaiter(void 0, void 0, void 0, func
5034550345
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
5034650346
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
5034750347
if (!packageManagerInfo) {
50348-
throw new Error(`Caching for '${packageManager}' is not supported`);
50348+
core.debug(`Caching for '${packageManager}' is not supported`);
50349+
return;
5034950350
}
5035050351
const cachePath = yield cache_utils_1.getCacheDirectoryPath(packageManagerInfo, packageManager);
5035150352
if (primaryKey === state) {

dist/setup/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64608,7 +64608,7 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
6460864608
let extPath;
6460964609
info = info || {}; // satisfy compiler, never null when reaches here
6461064610
if (osPlat == 'win32') {
64611-
let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
64611+
let _7zPath = path.join(__dirname, '../..', 'externals', '7zr.exe');
6461264612
extPath = yield tc.extract7z(downloadPath, undefined, _7zPath);
6461364613
// 7z extracts to folder matching file name
6461464614
let nestedPath = path.join(extPath, path.basename(info.fileName, '.7z'));

src/cache-save.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async function run() {
88
try {
99
await cachePackages(cacheLock);
1010
} catch (error) {
11-
core.setFailed('Failed to remove private key');
11+
core.setFailed(error.message);
1212
}
1313
}
1414

@@ -18,7 +18,8 @@ const cachePackages = async (packageManager: string) => {
1818

1919
const packageManagerInfo = await getPackageManagerInfo(packageManager);
2020
if (!packageManagerInfo) {
21-
throw new Error(`Caching for '${packageManager}' is not supported`);
21+
core.debug(`Caching for '${packageManager}' is not supported`);
22+
return;
2223
}
2324

2425
const cachePath = await getCacheDirectoryPath(

src/installer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export async function getNode(
128128
let extPath: string;
129129
info = info || ({} as INodeVersionInfo); // satisfy compiler, never null when reaches here
130130
if (osPlat == 'win32') {
131-
let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
131+
let _7zPath = path.join(__dirname, '../..', 'externals', '7zr.exe');
132132
extPath = await tc.extract7z(downloadPath, undefined, _7zPath);
133133
// 7z extracts to folder matching file name
134134
let nestedPath = path.join(extPath, path.basename(info.fileName, '.7z'));

0 commit comments

Comments
 (0)