diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index 6bd3341..b7544e1 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -11,7 +11,8 @@ services: build: go-gin-gonic volumes: - ./go-gin-gonic:/app - + environment: + - NIGHTWATCH_DEBUG=${NIGHTWATCH_DEBUG:-no} example: build: . volumes: diff --git a/main.go b/main.go index b4f56c2..ae748d3 100644 --- a/main.go +++ b/main.go @@ -28,7 +28,7 @@ func main() { Version: Version, Usage: "A utility for running arbitrary commands when files change", Before: func(ctx *cli.Context) error { - if ctx.Bool("debug") { + if ctx.Bool("debug") || os.Getenv("NIGHTWATCH_DEBUG") == "yes" { logrus.SetLevel(logrus.DebugLevel) }