Skip to main content

Module unported

Module unported 

Source
Expand description

The work of the installed cli-git that is not ported, and the refusal notice. What: The work of the installed cli-git that this executable does not do yet, as one typed list, and the notice printed when a command needs any of it. Why: A command that needs unported work must stop with exit status 2 and say what is missing. Forwarding it instead would run the command without the protection the installed wrapper gives it, and nobody would see that it happened.

In TS you’d write (pseudocode):

// process.stderr.write(unportedNotice({ kind: 'commit-transaction' }, 'commit')); process.exitCode = 2;

Enums§

Unported
What: One piece of unported work. An enum is a closed set of named alternatives; some carry a value. #[derive(...)] asks the compiler to generate copying, debug printing and ==. Why: Every refusal of this executable is one of these, so the list of what stops a command is in one place and a test can name the exact reason.

Functions§

unported_from_unavailable
What: Turn the engine’s “unavailable” answer into the refusal it stands for. Why: The engine reports what it could not evaluate; the wrapper refuses with one vocabulary whether the gap was found by the engine or before it.
unported_notice
What: The complete, line-terminated notice for a command stopped by unported work. &str borrows the command words as the caller typed them. Why: One sentence shape for every refusal: what is missing, that the command did not run, and where the complete implementation is.