Skip to content

Commit

Permalink
update moveLayerTarsInDir
Browse files Browse the repository at this point in the history
  • Loading branch information
satackey committed Aug 15, 2020
1 parent a9b1350 commit 50cf92b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/LayerCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ class LayerCache {
}

private async moveLayerTarsInDir(fromDir: string, toDir: string) {
const fromDirTrailingSlash = fromDir.endsWith(`/`) ? fromDir : `${fromDir}/`
const layerTars = (await recursiveReaddir(fromDir))
.filter(path => path.endsWith(`/layer.tar`))
.map(path => path.replace(fromDirTrailingSlash, ``))
.map(path => path.replace(`${fromDir}/`, ``))

const moveLayer = async (layer: string) => {
const from = path.resolve(`${fromDir}/${layer}`)
Expand Down

0 comments on commit 50cf92b

Please sign in to comment.