aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-03-06 14:41:42 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-03-06 14:41:42 -0500
commitce5f644a0e591b056d0a75ba18728f7b989ad3f7 (patch)
tree418809e2ac23ed80a2248cae94c6ba46dbfd2683 /src/lib
parenta2e034827b06a6f53e799aaa31f9c975b7520a63 (diff)
downloadstasis-ce5f644a0e591b056d0a75ba18728f7b989ad3f7.tar.gz
Only execute image check when requested
* Fix memory leak on failure
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/delivery/delivery_populate.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/lib/delivery/delivery_populate.c b/src/lib/delivery/delivery_populate.c
index 30216b2..4ea93c1 100644
--- a/src/lib/delivery/delivery_populate.c
+++ b/src/lib/delivery/delivery_populate.c
@@ -108,16 +108,21 @@ int populate_delivery_cfg(struct Delivery *ctx, int render_mode) {
return -1;
}
- char *manifest_inspect_cmd = NULL;
- if (asprintf(&manifest_inspect_cmd, "manifest inspect '%s'", globals.wheel_builder_manylinux_image) < 0) {
- SYSERROR("%s", "unable to allocate memory for docker command");
- return -1;
- }
- if (ctx->deploy.docker.capabilities.usable && docker_exec(manifest_inspect_cmd, STASIS_DOCKER_QUIET_STDOUT)) {
- SYSERROR("Image provided by default:wheel_builder_manylinux_image does not exist: %s", globals.wheel_builder_manylinux_image);
- return -1;
+ if (strcmp(globals.wheel_builder, "manylinux") == 0) {
+ char *manifest_inspect_cmd = NULL;
+ if (asprintf(&manifest_inspect_cmd, "manifest inspect '%s'", globals.wheel_builder_manylinux_image) < 0) {
+ SYSERROR("%s", "unable to allocate memory for docker command");
+ guard_free(manifest_inspect_cmd);
+ return -1;
+ }
+ if (ctx->deploy.docker.capabilities.usable && docker_exec(manifest_inspect_cmd, STASIS_DOCKER_QUIET_STDOUT)) {
+ SYSERROR("Image provided by default:wheel_builder_manylinux_image does not exist: %s", globals.wheel_builder_manylinux_image);
+ guard_free(manifest_inspect_cmd);
+ return -1;
+ }
+ guard_free(manifest_inspect_cmd);
}
- guard_free(manifest_inspect_cmd);
+
if (globals.jfrog.jfrog_artifactory_base_url) {
guard_free(globals.jfrog.jfrog_artifactory_base_url);