File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27244,8 +27244,10 @@ async function restoreLocalCache(cachePaths) {
27244
27244
await io.rmRF(p.pathInCache);
27245
27245
}
27246
27246
const expandedFilePath = resolveHome(p.mountTarget);
27247
- await io.mkdirP(expandedFilePath);
27248
27247
await io.mkdirP(p.pathInCache);
27248
+ // Sudo to be able to create dirs in root (e.g. /nix).
27249
+ // Use `install` instead of `mkdir -p` to easily set owners.
27250
+ await lib_exec.exec(`sudo install -d -o runner -g docker ${expandedFilePath}`);
27249
27251
await lib_exec.exec(`sudo mount --bind ${p.pathInCache} ${expandedFilePath}`);
27250
27252
}
27251
27253
return cacheMisses;
Original file line number Diff line number Diff line change @@ -86,8 +86,10 @@ export async function restoreLocalCache(
86
86
}
87
87
88
88
const expandedFilePath = utils . resolveHome ( p . mountTarget ) ;
89
- await io . mkdirP ( expandedFilePath ) ;
90
89
await io . mkdirP ( p . pathInCache ) ;
90
+ // Sudo to be able to create dirs in root (e.g. /nix).
91
+ // Use `install` instead of `mkdir -p` to easily set owners.
92
+ await exec . exec ( `sudo install -d -o runner -g docker ${ expandedFilePath } ` ) ;
91
93
await exec . exec ( `sudo mount --bind ${ p . pathInCache } ${ expandedFilePath } ` ) ;
92
94
}
93
95
You can’t perform that action at this time.
0 commit comments