9 Commits
Author SHA1 Message Date
Rauhul Varma 6924db870d Use Foundation Essentials when possible (#804)
* add implementation of replacing(_:with:)
* remove use of range(of:)
* Consolidate foundation usage
* Consolidate error to string logic
* Clean up env a bit
2025-09-11 18:44:31 -05:00
Nate Cook 134451f572 Fix up license headers and enable check (#746) 2025-02-24 06:53:19 -08:00
Rauhul Varma 10d80282e5 Enable swift-format checking (#711)
Adopts the common swift-mmio and swift-argument-parser format and enables CI checking.

Fixes: #702
2025-02-10 14:58:19 -08:00
Cœur 1c8215f18a Prefer let for private configurations (#617) 2024-02-28 11:29:01 -06:00
Nate Cook e5178a971d Remove special casing for CustomNSError (#276)
The error code in CustomNSError is actually _not_ appropriate to use as
the command's exit code.
2021-02-18 14:03:13 -06:00
Kenny 267558bb4d Beautify NSError cases when thrown 💄 (#272) 2021-02-15 17:17:13 -06:00
Sergey Petrachkov 53555a0450 Support Exit codes from thrown CustomNSError conformers (#244)
Introduce customnserror support, so exit code is calculated correctly, resolves #243.
2020-11-05 13:37:36 -06:00
Nate Cook 31799bc1b4 Add built-in support for --version flag (#102)
* Add built-in support for --version flag

* Test that command-defined --version overrides the built-in.

* Document the `version:` parameter in CommandConfiguration

* Include --version in the generated help.
2020-03-30 12:36:21 -05:00
Nate Cook ddc828f8cb Add an API for converting an error to an exit code (#79)
* Add an API for converting an error to an exit code

* Make ExitCode more useful as a value type

* Update tests to use ExitCode values

* Typo fix

* Add a test for ExitCode.isSuccess

* Switch to just using ExitCode for tests
2020-03-21 12:44:32 -05:00