diff --git a/README.md b/README.md index 7294959..48df5e4 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,15 @@ $ xcaddy build \ --with github.com/caddyserver/ntlm-transport@v0.1.1=../../my-fork ``` +You can even replace Caddy core using the `--with` flag: + +``` +$ xcaddy build \ + --with github.com/caddyserver/caddy/v2=../../my-caddy-fork +``` + +This allows you to hack on Caddy core (and optionally plug in extra modules at the same time!) with relative ease. + ### For plugin development If you run `xcaddy` from within the folder of the Caddy plugin you're working on _without the `build` subcommand_, it will build Caddy with your current module and run it, as if you manually plugged it in and invoked `go run`. diff --git a/cmd/xcaddy/main.go b/cmd/xcaddy/main.go index acf4658..bc0fe58 100644 --- a/cmd/xcaddy/main.go +++ b/cmd/xcaddy/main.go @@ -141,7 +141,7 @@ func getCaddyOutputFile() string { if runtime.GOOS == "windows" { return "caddy.exe" } - return "caddy" + return "." + string(filepath.Separator) + "caddy" } func runDev(ctx context.Context, args []string) error {