diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-02-18 18:02:11 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-02-18 18:02:11 -0500 |
| commit | bddde6dde420ae9d0bc6d8c2ad6865de7e90c73e (patch) | |
| tree | b9c1b1215b03e59bf7b2aaf14ec12fd33fe2d3e1 /src/cli/stasis | |
| parent | 5a79c9d0bcc8ec9de216dca49cf160d38f3c6118 (diff) | |
| download | stasis-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/cli/stasis')
| -rw-r--r-- | src/cli/stasis/system_requirements.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cli/stasis/system_requirements.c b/src/cli/stasis/system_requirements.c index d8d7df3..cb0ebd5 100644 --- a/src/cli/stasis/system_requirements.c +++ b/src/cli/stasis/system_requirements.c @@ -38,18 +38,18 @@ void check_system_requirements(struct Delivery *ctx) { delivery_init_tmpdir(ctx); } - struct DockerCapabilities dcap; - if (!docker_capable(&dcap)) { + if (!docker_capable(&ctx->deploy.docker.capabilities)) { + struct DockerCapabilities *dcap = &ctx->deploy.docker.capabilities; msg(STASIS_MSG_L2 | STASIS_MSG_WARN, "Docker is broken\n"); - msg(STASIS_MSG_L3, "Available: %s\n", dcap.available ? "Yes" : "No"); - msg(STASIS_MSG_L3, "Usable: %s\n", dcap.usable ? "Yes" : "No"); - msg(STASIS_MSG_L3, "Podman [Docker Emulation]: %s\n", dcap.podman ? "Yes" : "No"); + msg(STASIS_MSG_L3, "Available: %s\n", dcap->available ? "Yes" : "No"); + msg(STASIS_MSG_L3, "Usable: %s\n", dcap->usable ? "Yes" : "No"); + msg(STASIS_MSG_L3, "Podman [Docker Emulation]: %s\n", dcap->podman ? "Yes" : "No"); msg(STASIS_MSG_L3, "Build plugin(s): "); - if (dcap.usable) { - if (dcap.build & STASIS_DOCKER_BUILD) { + if (dcap->usable) { + if (dcap->build & STASIS_DOCKER_BUILD) { printf("build "); } - if (dcap.build & STASIS_DOCKER_BUILD_X) { + if (dcap->build & STASIS_DOCKER_BUILD_X) { printf("buildx "); } puts(""); |
