mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 09:40:13 +08:00
Prevent errors test fail if $GOPATH is something like /home/user/caddy (#2347)
This commit is contained in:
parent
1b085efa47
commit
8f7a1d6a25
|
@ -142,7 +142,7 @@ func (h ErrorHandler) recovery(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
// Trim file path
|
||||
delim := "/caddy/"
|
||||
delim := "/github.com/mholt/caddy/"
|
||||
pkgPathPos := strings.Index(file, delim)
|
||||
if pkgPathPos > -1 && len(file) > pkgPathPos+len(delim) {
|
||||
file = file[pkgPathPos+len(delim):]
|
||||
|
|
Loading…
Reference in New Issue
Block a user