Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 09:30 UTC
cmd: ignore exec.ErrDot when starting caddy in background (#6512)
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
WeidiDeng committed
Aug 13, 2024 at 10:26 UTC
9ddb78fadcdbec89a609127918604174121dcf42
1 file changed
+4
cmd/commandfuncs.go
+4
@@ -74,6 +74,10 @@ func cmdStart(fl Flags) (int, error) {
74
// sure by giving it some random bytes and having it echo
75
// them back to us)
76
cmd := exec.Command(os.Args[0], "run", "--pingback", ln.Addr().String())
77
+ // we should be able to run caddy in relative paths
78
+ if errors.Is(cmd.Err, exec.ErrDot) {
79
+ cmd.Err = nil
80
+ }
81
if configFlag != "" {
82
cmd.Args = append(cmd.Args, "--config", configFlag)
83
}