Skip to content

Commit 4e0b6c7

Browse files
committed
Limit to Linux only
1 parent a4d10f0 commit 4e0b6c7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

dist/setup/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61155,8 +61155,8 @@ const restoreCache = (versionSpec, packageManager, cacheDependencyPath) => __awa
6115561155
if (!fileHash) {
6115661156
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
6115761157
}
61158-
const imageOS = process.env.ImageOS || 'self-hosted';
61159-
const primaryKey = `setup-go-${platform}-${imageOS}-go-${versionSpec}-${fileHash}`;
61158+
const linuxVersion = process.env.RUNNER_OS === 'Linux' ? `${process.env.ImageOS}-` : '';
61159+
const primaryKey = `setup-go-${platform}-${linuxVersion}go-${versionSpec}-${fileHash}`;
6116061160
core.debug(`primary key is ${primaryKey}`);
6116161161
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
6116261162
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey);

src/cache-restore.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ export const restoreCache = async (
2929
);
3030
}
3131

32-
const imageOS = process.env.ImageOS || 'self-hosted';
33-
const primaryKey = `setup-go-${platform}-${imageOS}-go-${versionSpec}-${fileHash}`;
32+
const linuxVersion =
33+
process.env.RUNNER_OS === 'Linux' ? `${process.env.ImageOS}-` : '';
34+
const primaryKey = `setup-go-${platform}-${linuxVersion}go-${versionSpec}-${fileHash}`;
3435
core.debug(`primary key is ${primaryKey}`);
3536

3637
core.saveState(State.CachePrimaryKey, primaryKey);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy