Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Fix plugin resolution for multiple directories and plugins in plugin …
Browse files Browse the repository at this point in the history
…directory roots. Correctly handle plugins at absolute paths.
  • Loading branch information
Logan Glasson committed Jan 20, 2019
1 parent 903cddc commit d0da053
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = ( ) => {
rootDirs.forEach( dir => {
if ( fs.existsSync( dir ) ) {
let dirs = getDirectories( dir )
pluginDirs = [ ...dirs, pluginDirs ]
pluginDirs.push( ...dirs, dir )
} else
winston.warn( `specified plugin directory does not exist: ${dir}` )
} )
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ if ( cluster.isMaster ) {

// register plugins with express
plugins.forEach( plugin => {
app.use( plugin.serveFrom, express.static( path.join( __dirname, plugin.serveSource ? plugin.serveSource : plugin.sourceDir ) ) )
app.use( plugin.serveFrom, express.static( path.join( plugin.serveSource ? plugin.serveSource : plugin.sourceDir ) ) )
} )

// expose an api
Expand Down

0 comments on commit d0da053

Please sign in to comment.