diff --git a/dga/dga.go b/dga/dga.go index 5a75336..069236a 100644 --- a/dga/dga.go +++ b/dga/dga.go @@ -313,7 +313,7 @@ func ActionsOpenEnvFile(cfg *Config) (*os.File, error) { pterm.Info.Printfln("envFileName permission: %#o", fi.Mode().Perm()) } - envFile, err = os.OpenFile(envFileName, os.O_APPEND|os.O_WRONLY, os.FileMode(0o644)) //nolint:nosnakecase // these are standard package values and ok to leave snakecase. + envFile, err = os.OpenFile(envFileName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) //nolint:nosnakecase // these are standard package values and ok to leave snakecase. if errors.Is(err, os.ErrNotExist) { // See if we can provide some useful info on the existing permissions.