Skip to content

Commit 5b6db76

Browse files
authored
Merge pull request #37 from enam-co/main
Use sudo to clear cache source during extraction
2 parents 1e9b89a + 87d545d commit 5b6db76

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[*.ts]
2+
indent_style = space
3+
indent_size = 4

dist/index.js

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/extract-cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { run, runPiped } from './run.js';
66
async function extractCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string) {
77
// Prepare Timestamp for Layer Cache Busting
88
const date = new Date().toISOString();
9-
9+
1010
await fs.mkdir(scratchDir, { recursive: true });
1111
await fs.writeFile(path.join(scratchDir, 'buildstamp'), date);
1212

@@ -42,7 +42,7 @@ RUN --mount=${mountArgs} \
4242
);
4343

4444
// Move Cache into Its Place
45-
await fs.rm(cacheSource, { recursive: true, force: true });
45+
await run('sudo', ['rm', '-rf', cacheSource]);
4646
await fs.rename(path.join(scratchDir, 'dance-cache'), cacheSource);
4747
}
4848

0 commit comments

Comments
 (0)