Skip to content

Commit e429957

Browse files
committed
fix: assert file system path for skopeo copy is truthy
pullImages implicitly relies on the list of pullable images it receives to have fileSystemPaths for each image, as a valid path in the filesystem where we can instruct Skopeo to pull images to. right now, it accepts undefined values as these paths, resulting in calls to Skopeo creating a file named "undefined" on the filesystem. this commit amends this behaviour by asserting the fileSystemPath is truthy before calling Skopeo.
1 parent 86fb8da commit e429957

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/scanner/images/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ export async function pullImages(images: IPullableImage[]): Promise<IPullableIma
88

99
for (const image of images) {
1010
const {imageName, fileSystemPath} = image;
11+
if (!fileSystemPath) {
12+
continue;
13+
}
14+
1115
try {
1216
await skopeoCopy(imageName, fileSystemPath);
1317
pulledImages.push(image);

0 commit comments

Comments
 (0)