aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
AgeCommit message (Collapse)Author
2024-03-05cmd: Adjust config load logs/errors (#6032)Francis Lavoie
* cmd: Adjust config load logs/errors * Update cmd/main.go Co-authored-by: Matt Holt <[email protected]> --------- Co-authored-by: Matt Holt <[email protected]>
2024-03-01cmd: fix the output of the `Usage` section (#6138)Mohammed Al Sahaf
2024-01-31Update comment in setcap helper scriptMatthew Holt
2024-01-19refactor: move automaxprocs init in caddycmd.Main()Kévin Dunglas
2024-01-02chore: check against errors of `io/fs` instead of `os` (#6011)Mohammed Al Sahaf
* chore: replace `os.ErrNotExist` with `fs.ErrNotExist` * check against permission error from `io/fs` package
2023-12-18cmd: use automaxprocs for better perf in containers (#5711)Kévin Dunglas
* feat: use automaxprocs for better perf in containers * better logs * cs
2023-12-13cmd: Preserve LastModified date when exporting storage (#5968)Jens-Uwe Mager
2023-10-16cmd: Add newline character to version string in CLI output (#5895)Thanmay Nath
2023-10-13cmd: upgrade: resolve symlink of the executable (#5891)Mohammed Al Sahaf
2023-10-11cmd: Fix exiting with custom status code, add `caddy -v` (#5874)Francis Lavoie
* Simplify variables for commands * Add --envfile support for adapt command * Carry custom status code for commands to os.Exit() * cmd: add `-v` and `--version` to root caddy command * Add `--envfile` to `caddy environ`, extract flag parsing to func --------- Co-authored-by: Mohammed Al Sahaf <[email protected]>
2023-09-07cmd: Prevent overwriting existing env vars with `--envfile` (#5803)Evan Van Dam
Co-authored-by: Francis Lavoie <[email protected]>
2023-08-14ci: use gci linter (#5708)Jacob Gadikian
* use gofmput to format code * use gci to format imports * reconfigure gci * linter autofixes * rearrange imports a little * export GOOS=windows golangci-lint run ./... --fix
2023-08-09cmd: Require config for caddy validate (fix #5612) (#5614)pistasjis
* Require config for caddy validate - fixes #5612 Signed-off-by: Pistasj <[email protected]> * Try making adjacent Caddyfile check its own function Signed-off-by: Pistasj <[email protected]> * add Francis' suggestion Co-authored-by: Francis Lavoie <[email protected]> * Refactor * Fix borked commit, sigh --------- Signed-off-by: Pistasj <[email protected]> Co-authored-by: Francis Lavoie <[email protected]> Co-authored-by: Matthew Holt <[email protected]>
2023-08-07ci: Use gofumpt to format code (#5707)Jacob Gadikian
2023-08-06cmd: Split unix sockets for admin endpoint addresses (#5696)Emily
* cmd: fix cli when admin endpoint uses new unix socket permission format Fixes a bug where the following Caddyfile ```Caddyfile { admin unix/admin.sock|0660 } ``` and `caddy reload --config Caddyfile` would throw the following error instead of reloading it: ``` INFO using provided configuration {"config_file": "Caddyfile", "config_adapter": ""} Error: sending configuration to instance: performing request: Post "http://127.0.0.1/load": dial unix admin.sock|0660: connect: no such file or directory [ERROR] exit status 1 ``` --- This bug also affected `caddy start` and `caddy stop`. * Move splitter function to internal --------- Co-authored-by: Matthew Holt <[email protected]>
2023-08-02core: Allow loopback hosts for admin endpoint (fix #5650) (#5664)Matt Holt
2023-06-02cmd: Implement storage import/export (#5532)Cass C
* cmd: Implement 'storage import' and 'storage export' CLI commands. These commands use the certmagic.Storage interface. In particular, storage implementations should ensure that their List() functions correctly enumerate all keys when called with an empty prefix and recursive == true. Also, Stat() calls on keys holding values instead of nested keys are expected to set KeyInfo.IsTerminal = true. * remove errors.Join
2023-05-17cmd: Avoid spammy log messages (fix #5538)Matthew Holt
I forgot there are two calls to LoadConfig() here that needed replacing.
2023-05-12cmd: Reduce spammy logs from --watchMatthew Holt
2023-05-08feature: watch include directory (#5521)Yehonatan Ezron
Co-authored-by: Matt Holt <[email protected]>
2023-04-10cmd: Support `'` quotes in envfile parsing (#5437)Matt Holt
2023-04-03cmd: Create pidfile before config load (close #5477)Matthew Holt
2023-02-24cmd: Expand cobra support, add short flags (#5379)Francis Lavoie
* cmd: Expand cobra support * Convert commands to cobra, add short flags * Fix version command typo Co-authored-by: Emily Lange <[email protected]> * Apply suggestions from code review Co-authored-by: Matt Holt <[email protected]> --------- Co-authored-by: Emily Lange <[email protected]> Co-authored-by: Matt Holt <[email protected]>
2023-02-22cmd: Strict unmarshal for validate (#5383)Francis Lavoie
2023-02-16cmd: make `caddy fmt` hints more clear (#5378)Emily Lange
2023-02-16cmd: Adjust documentation for commands (#5377)Francis Lavoie
2023-01-31cmd: Add `--envfile` flag to `validate` command (#5350)Amis Shokoohi
Fixes https://github.com/caddyserver/caddy/issues/5346
2023-01-31cmd: `fmt` exit successfully after overwriting config file (#5351)Amis Shokoohi
Fixes https://github.com/caddyserver/caddy/issues/5349
2023-01-21cmd: `caddy fmt` return code is 1 if not formatted (#5297)Y.Horie
* cmd: Fix caddy fmt if input isn't formatted * Fixes #5294 * return exit 1 with an error message * cmd: Use formattingDifference for caddy fmt * #5294 * expose caddyfile.formattingDifference
2023-01-21chore: Fix typo, coral -> cobra (#5325)Y.Horie
2022-11-14reverseproxy: Mask the WS close message when we're the client (#5199)Francis Lavoie
* reverseproxy: Mask the WS close message when we're the client * weakrand * Bump golangci-lint version so path ignores work on Windows * gofmt * ugh, gofmt everything, I guess
2022-10-25cmd: replace deprecate func use (#5170)Mohammed Al Sahaf
2022-10-17cmd: Add missing `\n` to HelpTemplate (#5151)BakaFT
2022-09-14cmd: Improve error message if config missingMatthew Holt
2022-09-13cmd: Customizable user agent (close #2795)Matthew Holt
2022-09-06cmd: Enhance some help textMatthew Holt
2022-09-01cmd: Don't print long help text on errorMatthew Holt
2022-08-30cmd: Enhance CLI docsMatthew Holt
2022-08-30cmd: add completion command (#4994)Mohammed Al Sahaf
* cmd: add completion command * error check
2022-08-30cmd: Migrate to `spf13/cobra`, remove single-dash arg support (#4565)Mohammed Al Sahaf
* cmd: migrate to spf13/cobra * add `manpage` command * limit Caddy tagline to root `help` only * hard-code the manpage section to 8
2022-08-06Replace strings.Index with strings.Cut (#4932)Chirag Maheshwari
2022-08-04Replace strings.Index usages with strings.Cut (#4930)WilczyńskiT
2022-08-04cmd: Use newly-available version information (#4931)Matt Holt
2022-08-02chore: Bump up to Go 1.19, minimum 1.18 (#4925)Francis Lavoie
2022-08-01Oops (sigh)Matthew Holt
Forgot to remove this redundant line
2022-08-01caddyhttp: Implement `caddy respond` command (#4870)Matt Holt
2022-07-29Minor docs clarificationMatthew Holt
Related to #4565
2022-07-29core: Windows service integration (#4790)WingLim
Co-authored-by: Matthew Holt <[email protected]>
2022-07-28Fix compilation on WindowsMatthew Holt
2022-07-28Fix deprecation notice by using UTF16PtrFromStringMatthew Holt