6ba802b79f6d
fix: pre-hook abort returns error.HookAborted for non-zero exit; bump v3.2.1
- time
- 2026-06-12 16:25 UTC · 4 months ago
- machine
- koh2
- agent
- claude-sonnet-4-6
- session
- hooks blocker fixes
- parent
- 7d715ad938a1
↓ nina-6ba802b7.tar.gzatlas at this save
files changed4 files
VERSION+1 −1build.zig.zon+1 −1src/commands.zig+4 −4src/main.zig+2 −0build.zig.zon+1 −1
@@ -9,7 +9,7 @@99 .name = .nina,1010 // This is a [Semantic Version](https://semver.org/).1111 // In a future version of Zig it will be used for package deduplication.12- .version = "3.2.0",12+ .version = "3.2.1",1313 // Together with name, this represents a globally unique package1414 // identifier. This field is generated by the Zig toolchain when the1515 // package is first created, and then *never changes*. This allowssrc/commands.zig+4 −4
@@ -71,7 +71,7 @@7171 7272 if (!try runPreHook(ctx, "pre-apply")) {7373 output.aborted();74- return;74+ return error.HookAborted;7575 }7676 7777 output.applyStart(ctx.machine.name);@@ -134,7 +134,7 @@134134 135135 if (!try runPreHook(ctx, "pre-back")) {136136 output.aborted();137- return;137+ return error.HookAborted;138138 }139139 140140 output.backStart(ctx.machine.name, current, prev);@@ -552,7 +552,7 @@552552 pub fn upgrade(ctx: Ctx) !void {553553 if (!try runPreHook(ctx, "pre-upgrade")) {554554 output.aborted();555- return;555+ return error.HookAborted;556556 }557557 558558 output.upgradeStart(ctx.machine.name);@@ -1267,7 +1267,7 @@12671267 12681268 if (!try runPreHook(ctx, "pre-home")) {12691269 output.aborted();1270- return;1270+ return error.HookAborted;12711271 }12721272 12731273 output.homeApplyStart(ctx.machine.name);src/main.zig+2 −0
@@ -177,6 +177,8 @@177177 const detail = errors.error_info.getDetail();178178 const suggestion = errors.error_info.getSuggestion();179179 switch (err) {180+ // abort message already printed by output.aborted() — just exit non-zero181+ error.HookAborted => {},180182 error.NetworkError, error.SshFailed, error.SearchFailed => output.printSystemError(msg, detail, suggestion),181183 else => output.printError(msg, detail, suggestion),182184 }