Skip to content

Commit 03ad4f6

Browse files
committed
add path.resove to LayerCache#moveLayertars
1 parent 8e8ae5a commit 03ad4f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/LayerCache.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ class LayerCache {
6060
}
6161

6262
private async separateAllLayerCaches() {
63-
await this.moveLayertars(this.getUnpackedTarDir(), this.getLayerCachesDir())
63+
await this.moveLayerTars(this.getUnpackedTarDir(), this.getLayerCachesDir())
6464
}
6565

6666
private async joinAllLayerCaches() {
67-
await this.moveLayertars(this.getLayerCachesDir(), this.getUnpackedTarDir())
67+
await this.moveLayerTars(this.getLayerCachesDir(), this.getUnpackedTarDir())
6868
}
6969

70-
private async moveLayertars(fromDir: string, toDir: string) {
70+
private async moveLayerTars(fromDir: string, toDir: string) {
7171
const layerTars = (await exec.exec(`find . -name layer.tar`, [], { cwd: fromDir })).stdoutStr.split(`\n`)
7272
const moveLayer = async (layer: string) => {
73-
const from = `${fromDir}/${layer}`
74-
const to = `${toDir}/${layer}`
73+
const from = path.resolve(`${fromDir}/${layer}`)
74+
const to = path.resolve(`${toDir}/${layer}`)
7575
core.debug(`Moving layer tar from ${from} to ${to}`)
7676
await fs.mkdir(`${path.dirname(to)}`, { recursive: true })
7777
await fs.rename(from, to)

0 commit comments

Comments
 (0)