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.
This commit is contained in:
Robin Bate Boerop 2023-04-03 21:12:13 +03:00 committed by Artturin
parent 72c492abb0
commit 824c9ac5c9

View file

@ -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() {