Commit Graph

14 Commits

Author SHA1 Message Date
Kyle Carberry 026b1cd2a4
chore: update to go 1.20 (#5968)
Co-authored-by: Colin Adler <colin1adler@gmail.com>
2023-02-02 12:36:27 -06:00
Mathias Fredriksson f4d6afb01d
feat(agent): Allow specifying log directory via flag or env (#5915) 2023-01-30 18:39:52 +02:00
Mathias Fredriksson 935bb99bed
test: Merge env maps to simplify (#5481) 2022-12-20 20:40:41 +00:00
Mathias Fredriksson c5cfefe3b2
test: Generate golden files for all (visible) CLI commands (#5479) 2022-12-20 22:17:51 +02:00
Colin Adler ab3b3d5fca
feat: add debouncing to provisionerd rpc calls (#5198) 2022-12-01 16:54:53 -06:00
Garrett Delfosse 2789fb7cac
fix: move experimental flag to server (#4959) 2022-11-08 16:59:39 +00:00
Mathias Fredriksson 587924fc42
feat: Add golden files to test cli help output (#4897) 2022-11-04 19:48:36 +02:00
Garrett Delfosse ffbaa93722
feat: add experimental flag (#4364) 2022-10-04 19:45:00 +00:00
Kyle Carberry a2098254cd
feat: Support `--header` for CLI commands to support proxies (#4008)
Fixes #3527.
2022-09-12 16:22:05 -05:00
Kyle Carberry b0fe9bcdd1
chore: Upgrade to Go 1.19 (#3617)
This is required as part of #3505.
2022-08-21 22:32:53 +00:00
Jon Ayers 62e685669f
feat: add verbose error messaging (#3053) 2022-07-20 15:17:51 -05:00
Mathias Fredriksson 749694b7de
fix: Standardize and wrap example descriptions at 80 chars (#2894) 2022-07-11 19:08:09 +03:00
Steven Masley e2b2580196
chore: `version` sub command remove `--version` and `-v` flag (#2090)
* test: Add unit test for version cmd
2022-06-06 17:38:51 -05:00
Joe Previte 6dae48a1a8
fix: show --help message for CLI errors, add tests for delete (#1403)
* feat(cli): add test for delete

This adds a new test for the `delete` command to ensure it works as
expected when provided the correct args.

* fix(cli): use ExecuteC() to match Cobra

This modifies the `cli.Root().Execute()` to `cli.Root).ExecuteC()` to
match the default behavior of Cobra. We do this so errors will always
print the "run --help" line.

* feat(cli): add WithoutParameters test for delete

This adds a new test to the `delete_test.go` suite to ensure the correct
behavior occurs when `delete` is called without an argument.

* fixup! feat(cli): add WithoutParameters test for delete

* refactor(cli): show --help error message on main

This adds an error message which shows when there is an error with any
commands called to improve the UX.

* fixup! refactor(cli): show --help error message on main

* refactor(cli): handle err with FormatCobraError

This adds a new helper function called `FormatCobraError` to `root.go`
so that we can colorize and add "--help" message to cobra command errors
like calling `delete`.

* refactor(cli): add root_test.go, move delete test
2022-05-19 22:35:59 +00:00