Browse Source

auto-create plugins folder (fixes #738)

Eugene Pankov 6 years ago
parent
commit
d42fe4f107
1 changed files with 4 additions and 0 deletions
  1. 4 0
      app/src/plugins.ts

+ 4 - 0
app/src/plugins.ts

@@ -28,6 +28,10 @@ const userPluginsPath = path.join(
     'plugins',
     'plugins',
 )
 )
 
 
+if (!fs.existsSync(userPluginsPath)) {
+    fs.mkdir(userPluginsPath)
+}
+
 Object.assign(window, { builtinPluginsPath, userPluginsPath })
 Object.assign(window, { builtinPluginsPath, userPluginsPath })
 nodeModule.globalPaths.unshift(builtinPluginsPath)
 nodeModule.globalPaths.unshift(builtinPluginsPath)
 nodeModule.globalPaths.unshift(path.join(userPluginsPath, 'node_modules'))
 nodeModule.globalPaths.unshift(path.join(userPluginsPath, 'node_modules'))