Skip to content

Commit a40d2f2

Browse files
committed
Fix env reading
1 parent e38c1d3 commit a40d2f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type Lidarr struct {
6565
Retry int `env:"LIDARR_RETRY" env-default:"5"` // Number of times to check search status before skipping the track
6666
DownloadAttempts int `env:"LIDARR_DL_ATTEMPTS" env-default:"3"` // Max number of files to attempt downloading per track
6767
LidarrDir string `env:"LIDARR_DIR" env-default:"/lidarr/"`
68-
MigrateDL bool `env:"MIGRATE_DOWNLOADS" env-default:"false"` // Move downloads from SlskdDir to DownloadDir
68+
MigrateDL bool `env:"MIGRATE_DOWNLOADS" env-default:"false"` // Move downloads from LidarrDir to DownloadDir
6969
Timeout int `env:"LIDARR_TIMEOUT" env-default:"20"`
7070
Scheme string `env:"LIDARR_SCHEME" env-default:"http"`
7171
URL string `env:"LIDARR_URL"`
@@ -154,7 +154,7 @@ func (cfg *Config) ReadEnv() {
154154
if err != nil {
155155
// If the error is because the file doesn't exist, fallback to env vars
156156
if errors.Is(err, os.ErrNotExist) {
157-
if err := cleanenv.ReadEnv(&cfg); err != nil {
157+
if err := cleanenv.ReadEnv(cfg); err != nil {
158158
slog.Error("failed to load config from env vars", "context", err.Error())
159159
os.Exit(1)
160160
}

0 commit comments

Comments
 (0)