@feigi/fleet-ctl 3.24.9 → 3.24.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/recipe-prove.mjs +9 -5
package/package.json
CHANGED
package/scripts/recipe-prove.mjs
CHANGED
|
@@ -161,9 +161,9 @@ function parseArgs(argv) {
|
|
|
161
161
|
//
|
|
162
162
|
// A git killed by a signal (that buffer kill, an OOM kill, a timeout wrapper)
|
|
163
163
|
// is still a failed command, never a throw: each caller maps a failed git to
|
|
164
|
-
// its own refusal. But it has no exit status
|
|
165
|
-
// names the kill, after whatever git did write — a caller
|
|
166
|
-
// otherwise quote an empty reason.
|
|
164
|
+
// its own refusal. But it has no exit status — `status` is null — and mostly
|
|
165
|
+
// no stderr, so `err` names the kill, after whatever git did write — a caller
|
|
166
|
+
// quoting `err` would otherwise quote an empty reason.
|
|
167
167
|
//
|
|
168
168
|
// A git that ignores the buffer kill can still exit 0, with no signal, after
|
|
169
169
|
// its output was cut off: any `error` on a git that ran fails it, whatever its
|
|
@@ -174,7 +174,7 @@ function git(args, cwd) {
|
|
|
174
174
|
const err = (r.stderr ?? "").trim();
|
|
175
175
|
const failed = r.signal ? `git was killed by ${r.signal}` : r.error && `git exited ${r.status} after an error`;
|
|
176
176
|
const note = failed && `${failed}${errorCause(r.error)}`;
|
|
177
|
-
return { ok: r.status === 0 && !r.error, out: (r.stdout ?? "").replace(/\n$/, ""), err: [err, note].filter(Boolean).join("; ") };
|
|
177
|
+
return { ok: r.status === 0 && !r.error, status: r.status, out: (r.stdout ?? "").replace(/\n$/, ""), err: [err, note].filter(Boolean).join("; ") };
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
function errorCause(error) {
|
|
@@ -328,7 +328,11 @@ function writeCache(cache, recipe, repo) {
|
|
|
328
328
|
if (!(e instanceof Refusal)) throw e;
|
|
329
329
|
throw noVerdict(e.message);
|
|
330
330
|
}
|
|
331
|
-
if (!probe.ok)
|
|
331
|
+
if (!probe.ok) {
|
|
332
|
+
const exit = probe.status === null ? "did not exit 0" : `exited ${probe.status}`;
|
|
333
|
+
const stderrNote = probe.err ? `: ${probe.err}` : " and wrote nothing to stderr";
|
|
334
|
+
throw noVerdict(`git started but does not run: \`git --version\` ${exit}${stderrNote}`);
|
|
335
|
+
}
|
|
332
336
|
const said = r.stderr.trim() || r.stdout.trim();
|
|
333
337
|
throw notProven(`the Recipe cache reader refuses what was proven: ${said || `it wrote nothing and exited with status ${r.status}`}`);
|
|
334
338
|
}
|