From 5d21c2c6eab632cc519eb23e529c2d985ac04921 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 21 Oct 2024 12:11:05 -0400 Subject: Change signature: * delivery_gather_tool_versions now returns non-zero if unable to determine a tool's version --- src/lib/core/delivery.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/lib/core') diff --git a/src/lib/core/delivery.c b/src/lib/core/delivery.c index e32ed4c..5645dcc 100644 --- a/src/lib/core/delivery.c +++ b/src/lib/core/delivery.c @@ -302,16 +302,22 @@ void delivery_defer_packages(struct Delivery *ctx, int type) { } } -void delivery_gather_tool_versions(struct Delivery *ctx) { - int status = 0; +int delivery_gather_tool_versions(struct Delivery *ctx) { + int status_tool_version = 0; + int status_tool_build_version = 0; // Extract version from tool output - ctx->conda.tool_version = shell_output("conda --version", &status); + ctx->conda.tool_version = shell_output("conda --version", &status_tool_version); if (ctx->conda.tool_version) strip(ctx->conda.tool_version); - ctx->conda.tool_build_version = shell_output("conda build --version", &status); + ctx->conda.tool_build_version = shell_output("conda build --version", &status_tool_build_version); if (ctx->conda.tool_build_version) strip(ctx->conda.tool_version); + + if (status_tool_version || status_tool_build_version) { + return 1; + } + return 0; } -- cgit