Skip to content

Commit 15fe4dd

Browse files
set cache to readonly if skipping save (#301)
1 parent 1a28b0b commit 15fe4dd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

dist/restore/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68103,6 +68103,9 @@ async function configure(ccacheVariant, platform) {
6810368103
await execShell(`ccache --set-config=cache_dir='${cacheDir(ccacheVariant)}'`);
6810468104
await execShell(`ccache --set-config=max_size='${maxSize}'`);
6810568105
await execShell(`ccache --set-config=compression=true`);
68106+
if (!lib_core.getBooleanInput("save")) {
68107+
await execShell(`ccache --set-config=read_only=true`);
68108+
}
6810668109
if (platform === "darwin") {
6810768110
await execShell(`ccache --set-config=compiler_check=content`);
6810868111
}

src/restore.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ async function configure(ccacheVariant : string, platform : string) : Promise<vo
5353
await execShell(`ccache --set-config=cache_dir='${cacheDir(ccacheVariant)}'`);
5454
await execShell(`ccache --set-config=max_size='${maxSize}'`);
5555
await execShell(`ccache --set-config=compression=true`);
56+
if (!core.getBooleanInput("save")) {
57+
await execShell(`ccache --set-config=read_only=true`);
58+
}
5659
if (platform === "darwin") {
5760
await execShell(`ccache --set-config=compiler_check=content`);
5861
}

0 commit comments

Comments
 (0)