Skip to content

Commit

Permalink
caddy1: fix build (#97988)
Browse files Browse the repository at this point in the history
main.go gets overwritten in order to build caddy with telemetry
disabled, but the global variable `run` got neglected, and this in turn
broke the test in caddy/main_test.go.

This commit fixes that, and build can now complete.

(cherry picked from commit c814b0e)
  • Loading branch information
panchoh authored and Jon committed Sep 15, 2020
1 parent 4c1163d commit af8a177
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/servers/caddy/v1.nix
Expand Up @@ -21,9 +21,10 @@ buildGoModule rec {
cat << EOF > caddy/main.go
package main
import "github.com/caddyserver/caddy/caddy/caddymain"
var run = caddymain.Run // replaced for tests
func main() {
caddymain.EnableTelemetry = false
caddymain.Run()
run()
}
EOF
'';
Expand Down

0 comments on commit af8a177

Please sign in to comment.