Skip to content

Commit

Permalink
Fix getEnvInt default value
Browse files Browse the repository at this point in the history
  • Loading branch information
l7ssha committed Nov 21, 2024
1 parent 63491d2 commit 862cb34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bool getEnvBool(String key, [bool? def]) => ['true', '1'].contains(getEnv(key, d

/// Get a [int] from an environment variable, throwing an exception if cannot be parsed to int.
int getEnvInt(String key, [int? def]) =>
int.tryParse(getEnv(key, key.toString())) ??
int.tryParse(getEnv(key, def.toString())) ??
(throw Exception('Environment variable `$key` cannot be parsed as int'));

/// Name of the bot
Expand Down

0 comments on commit 862cb34

Please sign in to comment.