Skip to content

v0.16.7 — bad input stops here

Choose a tag to compare

@ralyodio ralyodio released this 03 Aug 06:23
· 92 commits to main since this release
9eeec66

Eleven changes, and all but two are the same shape: a command that took a bad
input and did something anyway. That is the theme of this release.

Wrong input now stops instead of proceeding

Each of these previously accepted something invalid and failed later, somewhere
else, in a way that did not name the cause:

  • moshcode doh --port and moshcode dns — a port that cannot be bound is
    explained, not crashed on
  • moshcode update --interval — an interval systemd would reject is caught here
    rather than by a unit that silently never fires
  • moshcode skills — an unknown flag was being installed as the skill source
  • moshcode site — a starter that does not exist is refused, instead of serving
    an empty document root
  • moshcode template install — a nested template.json was dropped on the floor
  • mosh() in moshscript — no longer claims it launched a browser it never opened

Redirection is safe now

moshcode <verb> > file on a build without that verb wrote the help banner into
the file. Point it at an nginx config and nginx refuses to start, with an error
four layers away from the typo that caused it.

Help you asked for still goes to stdout. Help you got because a verb was wrong
goes to stderr, behind a one-line reason, and exits non-zero — so the redirect
leaves an empty file and an && chain stops.

Smaller

  • moshcode template install --dry-run — see the plan before it writes
  • moshcode pwd --json and moshcode prd --json — machine-readable output