Skip to content

v2.1.0

Choose a tag to compare

@github-actions github-actions released this 06 Jul 14:10

Added

  • Command.LineTerminator / StdoutLineTerminator / StderrLineTerminator (and their Command module pipe-equivalents) plus the LineTerminator type (Lf/Cr/CrLf/Any) to choose how the line-pumped path frames a line. The default Lf is unchanged (split on \n, stripping a preceding \r); Cr/Any also split on a bare \r, so carriage-return progress output (curl/pip/apt redrawing a line in place) streams as per-frame lines instead of piling up as one growing line. The choice applies uniformly to the buffered verbs, the streaming verbs (StdoutLinesAsync/OutputEventsAsync/WaitForLineAsync), and the OnStdoutLine/OnStderrLine callbacks; the raw OutputBytesAsync bytes and the tees stay byte-exact and unaffected.
  • Supervisor.GiveUpWhen(classifier) and StopReason.GaveUp: classify a crash's or a runner failure's ProcessError as permanent, so the supervisor gives up instead of restarting it forever.
  • ProcessKit.Testing.DryRunRunner — a subprocess-free IProcessRunner for a --dry-run seam: every verb renders the command deterministically (program, arguments, working directory) instead of spawning it, and History exposes every command "run" so far for inspection.
  • Command.Priority / Command.priority and the portable Priority type (Idle/BelowNormal/Normal/AboveNormal/High) to launch a child at a lower or higher CPU-scheduling priority: a Windows priority class set at process creation, or a Unix nice/setpriority value. The child's whole spawned tree runs at it on Unix (inherited across fork) and on Windows for the lowered classes (Idle/BelowNormal); on Windows AboveNormal/High apply to the immediate child but are not inherited by the grandchildren it later spawns, which default to Normal. Supported on both platform families (never Unsupported); the default is unchanged (normal priority). Raising priority above the inherited level on Unix (AboveNormal/High) needs privilege (e.g. CAP_SYS_NICE) — without it the spawn fails with ProcessError.Spawn rather than silently running lower.
  • Command.RetryNever / Command.retryNever: explicitly disable retrying for a command, always running it exactly once — distinct from simply not calling Retry, and the way to opt a command out of a Retry policy inherited from a CliClient.WithDefaults template.
  • Command.Umask / Command.umask: set the child's Unix file-mode creation mask (umask(2)), so files it creates land at the permissions you intend (pass the value you'd give the umask shell builtin, e.g. 0o022). Unix-only: because posix_spawn has no umask attribute, the mask is set on the parent and restored around the spawn under a lock that serializes it against every concurrent spawn — so a sibling spawn can never inherit a temporarily-set mask. On Windows (which has no equivalent) a set mask fails the spawn with ProcessError.Unsupported rather than being silently ignored. The default is unchanged (the inherited umask is left untouched).

Fixed

  • A pipeline whose checked stage fails now tears the whole chain down at once instead of waiting for a pipe EOF: a quiet, still-running sibling — classically an upstream producer that never writes, so never dies of a broken pipe — can no longer hold an already-failed chain open indefinitely. The pipefail result is unchanged (the stage that actually failed keeps the blame; the siblings the teardown kills are de-prioritized as victims).