From d42a0ab412cd0817b2ecea63383a47e2ade667f2 Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Tue, 7 Jul 2026 01:34:46 -0400 Subject: [PATCH] fix(storage): correct exit_code=0 treated as failed for successful jobs --- Makefile | 2 +- internal/storage/jobs.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7a7d461..30e2f8f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ BINARY=nasctl -VERSION?=0.8.0 +VERSION?=0.8.1 GO?=go LDFLAGS=-s -w -X github.com/darroyo/nasctl/internal/web.Version=$(VERSION) -X github.com/darroyo/nasctl/internal/web.Commit=$(shell git rev-parse --short HEAD 2>/dev/null || echo unknown) BUILD_FLAGS=CGO_ENABLED=0 diff --git a/internal/storage/jobs.go b/internal/storage/jobs.go index 86628a5..1444a4f 100644 --- a/internal/storage/jobs.go +++ b/internal/storage/jobs.go @@ -228,7 +228,7 @@ func (jm *JobManager) runJob(job db.StorageJob) { } } - exitCode := -1 + exitCode := 0 if err != nil { if exitErr, ok := err.(*exec.ExitError); ok { exitCode = exitErr.ExitCode()