We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dac383 commit 402a7d4Copy full SHA for 402a7d4
gc.js
@@ -5,7 +5,12 @@ const core = require('@actions/core')
5
6
function init(cacheConfig) {
7
core.startGroup(`Computing initial ${cacheConfig.name} cache hash`)
8
- fs.writeFileSync(cacheConfig.paths[0] + '.sha256', computeCacheHash(cacheConfig.paths[0]))
+ const hashFile = cacheConfig.paths[0] + '.sha256'
9
+ const parentDir = path.dirname(hashFile)
10
+ if (!fs.existsSync(parentDir)) {
11
+ fs.mkdirSync(parentDir, { recursive: true })
12
+ }
13
+ fs.writeFileSync(hashFile, computeCacheHash(cacheConfig.paths[0]))
14
core.endGroup()
15
}
16
0 commit comments