Skip to content

Commit

Permalink
Merge pull request #29 from Chagui-/patch-1
Browse files Browse the repository at this point in the history
Ensure scratch directory exists when calling extractCache
  • Loading branch information
AkihiroSuda committed May 1, 2024
2 parents 5de31fc + f7731e8 commit 336b023
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/extract-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { run, runPiped } from './run.js';
async function extractCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string) {
// Prepare Timestamp for Layer Cache Busting
const date = new Date().toISOString();

await fs.mkdir(scratchDir, { recursive: true });
await fs.writeFile(path.join(scratchDir, 'buildstamp'), date);

// Prepare Dancefile to Access Caches
Expand Down

0 comments on commit 336b023

Please sign in to comment.