Skip to content

Commit ca2c514

Browse files
authored
Merge pull request #26 from microsoft/quietly-skip-plugins-if-folder-not-present
adding check for plugin directory
2 parents ebfb1d3 + cde17bb commit ca2c514

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Services/PluginLoader.cs

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ public Task StopAsync(CancellationToken cancellationToken) {
6767
private void ScanAndLoadPlugins() {
6868
ILoggerFactory loggerFactory;
6969

70+
if (!Directory.Exists(_appConfig.PLUGIN_DIRECTORY)) {
71+
// If the plugin directory doesn't exist, we can't load plugins. Quietly return and try again later
72+
return;
73+
}
74+
7075
foreach (string file in System.IO.Directory.GetFiles(_appConfig.PLUGIN_DIRECTORY, "*.json.spacefx_plugin")) {
7176
string plugin_json = System.IO.File.ReadAllText(file);
7277
Models.PLUG_IN? config_plugin;

0 commit comments

Comments
 (0)