Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to override default env variables with .env file #3338

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: allow to override default env variables with .env file
  • Loading branch information
leonidboykov committed Jul 22, 2023
commit 7b88f2188f5b5799c985e3d3ebd0c75d838ad0f1
4 changes: 2 additions & 2 deletions cmd/drone-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/drone/drone/core"
"github.com/drone/drone/metric/sink"
"github.com/drone/drone/operator/runner"
"github.com/drone/drone/service/canceler/reaper"
"github.com/drone/drone/server"
"github.com/drone/drone/service/canceler/reaper"
"github.com/drone/drone/trigger/cron"
"github.com/drone/signal"

Expand All @@ -43,7 +43,7 @@ func main() {
flag.StringVar(&envfile, "env-file", ".env", "Read in a file of environment variables")
flag.Parse()

godotenv.Load(envfile)
godotenv.Overload(envfile)
config, err := config.Environ()
if err != nil {
logger := logrus.WithError(err)
Expand Down