aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/docs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-13 20:36:10 +0000
committertv <tv@krebsco.de>2026-11-13 22:01:46 +0100
commitce2cd2553a937d84f1a78386ab28502e89f247d6 (patch)
treefd598a289771894a6eb82157d192a5fa4f784b3f /pkgs/populate/docs
parent7768c71fd8083ea21572de2859fed39c17524baf (diff)
populate: exit with the status of the command that failed
The shell implementation runs under set -e, so it exits with the status of the command that failed, e.g. 255 if ssh can't reach the target, which wrappers retrying on connection failures rely on, or 128 if git fetch fails. The program does the same, instead of exiting with 1, and with 128 plus the signal for a command a signal ended. A phase's expect.status is the exit status it expects populate to fail with; git-status checks git fetch's.
Diffstat (limited to 'pkgs/populate/docs')
-rw-r--r--pkgs/populate/docs/design.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/populate/docs/design.md b/pkgs/populate/docs/design.md
index 6ad5eea..cc78a65 100644
--- a/pkgs/populate/docs/design.md
+++ b/pkgs/populate/docs/design.md
@@ -37,7 +37,11 @@ populate SPEC
input. Exit status:
- 0: populate delivered all sources.
-- 1: a check of the spec failed, or delivering did.
+- 1: a check of the spec failed, or delivering did, with a message of its
+ own.
+- The exit status of the command that failed, if delivering failed with
+ that, like the shell implementation does: e.g. 255 if ssh can't reach
+ the target, or 128 if git fetch fails.
- 2: the arguments are wrong, or the spec can't be read, isn't JSON, is of
another version, or doesn't have the spec's shape.
- 129, 130, 143: populate got SIGHUP, SIGINT, or SIGTERM, and stopped.