mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Ignoring error if creds_example.yml fails to generate, as this happens in docker containers
This commit is contained in:
@@ -37,8 +37,15 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
||||
public BotCredsProvider(int? totalShards = null)
|
||||
{
|
||||
_totalShards = totalShards;
|
||||
if (!File.Exists(CredsExamplePath))
|
||||
File.WriteAllText(CredsExamplePath, Yaml.Serializer.Serialize(_creds));
|
||||
try
|
||||
{
|
||||
if (!File.Exists(CredsExamplePath))
|
||||
File.WriteAllText(CredsExamplePath, Yaml.Serializer.Serialize(_creds));
|
||||
}
|
||||
catch
|
||||
{
|
||||
// this can fail in docker containers
|
||||
}
|
||||
|
||||
MigrateCredentials();
|
||||
|
||||
|
Reference in New Issue
Block a user