Commit 824c9ac5 authored by Robin Bate Boerop's avatar Robin Bate Boerop Committed by Artturin
Browse files

nix-prefetch-docker: handle overrides correctly

Without this change, the `--os` and `--arch` switches are disregarded
for operations involving `skopeo inspect` invocations. This means that,
for example, one cannot fetch Linux images while on macOS.
parent 72c492ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ get_image_digest(){
        imageTag="latest"
    fi

    skopeo --insecure-policy --tmpdir=$TMPDIR inspect "docker://$imageName:$imageTag" | jq '.Digest' -r
    skopeo --override-os "${os}" --override-arch "${arch}" --insecure-policy --tmpdir=$TMPDIR inspect "docker://$imageName:$imageTag" | jq '.Digest' -r
}

get_name() {