aboutsummaryrefslogtreecommitdiff
path: root/src/lib/delivery
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-02-18 18:02:11 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-02-18 18:02:11 -0500
commitbddde6dde420ae9d0bc6d8c2ad6865de7e90c73e (patch)
treeb9c1b1215b03e59bf7b2aaf14ec12fd33fe2d3e1 /src/lib/delivery
parent5a79c9d0bcc8ec9de216dca49cf160d38f3c6118 (diff)
downloadstasis-bddde6dde420ae9d0bc6d8c2ad6865de7e90c73e.tar.gz
Error checking and sequencing
* Add error checks for allocations * Check docker is usable on Linux, if not fall back to the host tools * check_system_requirements initializes the docker capabilities struct
Diffstat (limited to 'src/lib/delivery')
-rw-r--r--src/lib/delivery/delivery_build.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/lib/delivery/delivery_build.c b/src/lib/delivery/delivery_build.c
index d1239e4..2f31b33 100644
--- a/src/lib/delivery/delivery_build.c
+++ b/src/lib/delivery/delivery_build.c
@@ -193,10 +193,19 @@ struct StrList *delivery_build_wheels(struct Delivery *ctx) {
return NULL;
}
- if (!strcmp(ctx->system.platform[DELIVERY_PLATFORM], "Linux")) {
- asprintf(&cmd, "-m cibuildwheel --output-dir %s --only cp%s-manylinux_%s", outdir, ctx->meta.python_compact, ctx->system.arch);
- } else {
- asprintf(&cmd, "-m build -w -o %s", outdir);
+ if (asprintf(&cmd, "-m build -w -o %s", outdir) < 0) {
+ SYSERROR("%s", "Unable to allocate memory for build command");
+ return NULL;
+ }
+ if (!strcmp(ctx->system.platform[DELIVERY_PLATFORM], "Linux")
+ && globals.enable_docker
+ && ctx->deploy.docker.capabilities.usable) {
+ guard_free(cmd);
+ if (asprintf(&cmd, "-m cibuildwheel --output-dir %s --only cp%s-manylinux_%s",
+ outdir, ctx->meta.python_compact, ctx->system.arch) < 0) {
+ SYSERROR("%s", "Unable to allocate memory for cibuildwheel command");
+ return NULL;
+ }
}
if (python_exec(cmd)) {