diff --git a/config/config.go b/config/config.go index 492151fad..b37276dd8 100644 --- a/config/config.go +++ b/config/config.go @@ -194,7 +194,8 @@ type Changelog struct { Sort string `yaml:",omitempty"` } -// EnvFile is the +// EnvFiles holds paths to files that contains environment variables +// values like the github token for example type EnvFiles struct { GitHubToken string `yaml:"github_token,omitempty"` } diff --git a/pipeline/env/env.go b/pipeline/env/env.go index 97a7345c4..4724a9450 100644 --- a/pipeline/env/env.go +++ b/pipeline/env/env.go @@ -59,10 +59,10 @@ func loadEnv(env, path string) (string, error) { if err != nil { return "", err } - if _, err := os.Stat(path); os.IsNotExist(err) { + bts, err := ioutil.ReadFile(path) + if os.IsNotExist(err) { return "", nil } - bts, err := ioutil.ReadFile(path) if err != nil { return "", err }