diff --git a/src/NadekoBot/Services/Impl/BotCredsProvider.cs b/src/NadekoBot/Services/Impl/BotCredsProvider.cs index 4550e60f9..e1a791e5d 100644 --- a/src/NadekoBot/Services/Impl/BotCredsProvider.cs +++ b/src/NadekoBot/Services/Impl/BotCredsProvider.cs @@ -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();