Let a dry run answer without a terminal #128

Closed
opened 2026-08-30 21:11:25 +00:00 by jcoffey-dev · 0 comments
Owner

--dry-run could not be used over SSH, which is the machine you are most likely to be on when you want one.

The confirmation ran before the dry-run check, so a non-interactive dry run hit "refusing: this introduces new commits and there is no terminal to confirm on" and exited 1 — the refusal coming out instead of the report it was asked for. Nothing was ever going to be deployed; it was asking whether to go ahead with something that was not going to happen.

The report now prints, then a dry run stops, then the confirmation gates the real thing.

Guard 1 is untouched and still refuses a held commit under --dry-run, since a hold is an answer a dry run should give.

While in that header: --help printed a fixed line range (sed -n '2,28p'), which this edit would have silently clipped. It prints the leading comment block itself now, so the next edit cannot truncate it.

Checked against a throwaway clone, non-interactively: a dry run with new commits reports and exits 0; a held commit still refuses; a real deploy with no --yes and no terminal still refuses with exit 1; "already at" plus dry run reports and exits 0. The checkout was unchanged after all of them.

Merged 2026-08-30 as coffey-labs/ihasmail@ecc030aa3f

Rebuilt from: git history, session transcript.

`--dry-run` could not be used over SSH, which is the machine you are most likely to be on when you want one. The confirmation ran before the dry-run check, so a non-interactive dry run hit *"refusing: this introduces new commits and there is no terminal to confirm on"* and exited 1 — the refusal coming out instead of the report it was asked for. Nothing was ever going to be deployed; it was asking whether to go ahead with something that was not going to happen. The report now prints, then a dry run stops, then the confirmation gates the real thing. Guard 1 is untouched and still refuses a held commit under `--dry-run`, since a hold is an answer a dry run should give. While in that header: `--help` printed a fixed line range (`sed -n '2,28p'`), which this edit would have silently clipped. It prints the leading comment block itself now, so the next edit cannot truncate it. Checked against a throwaway clone, non-interactively: a dry run with new commits reports and exits 0; a held commit still refuses; a real deploy with no `--yes` and no terminal still refuses with exit 1; "already at" plus dry run reports and exits 0. The checkout was unchanged after all of them. **Merged** 2026-08-30 as coffey-labs/ihasmail@ecc030aa3f90 <sub>Rebuilt from: git history, session transcript.</sub>
This repo is archived. You cannot comment on issues.