@@ -15,6 +15,8 @@ const packagingUtils = require('./packaging-utils');
1515const serverUtils = require ( '../lib/util' ) ;
1616const jsonUtils = require ( '../lib/jsonUtils' ) ;
1717const rmrf = require ( 'rimraf' ) ;
18+ const yamlConfig = require ( './yamlConfig' ) ;
19+
1820
1921//assuming that this is file isnt being called from another that is already using the logger... else expect strange logs
2022//TO DO - Sean - bootstrap logger
@@ -67,13 +69,15 @@ if(calledViaCLI){
6769 pluginsDir = serverUtils . normalizePath ( userInput . pluginsDir ) ;
6870 } else {
6971 userInput . zluxConfig = serverUtils . normalizePath ( userInput . zluxConfig ) ;
70- const zluxConfig = jsonUtils . parseJSONWithComments ( userInput . zluxConfig ) ;
71- pluginsDir = serverUtils . normalizePath (
72- zluxConfig . pluginsDir ,
73- process . cwd ( ) ) ;
74- if ( ! path . isAbsolute ( pluginsDir ) ) {
75- //zluxconfig paths relative to whereever that file is
76- path . normalize ( userInput . zluxConfig , pluginsDir ) ;
72+ const zluxConfig = yamlConfig . getConfig ( userInput . zluxConfig , undefined , [ 'app-server' , 'zss' ] ) ;
73+ if ( zluxConfig && typeof zluxConfig . pluginsDir === 'string' ) {
74+ pluginsDir = serverUtils . normalizePath (
75+ zluxConfig . pluginsDir ,
76+ process . cwd ( ) ) ;
77+ if ( ! path . isAbsolute ( pluginsDir ) ) {
78+ //zluxconfig paths relative to whereever that file is
79+ path . normalize ( userInput . zluxConfig , pluginsDir ) ;
80+ }
7781 }
7882 }
7983 if ( isFile ( pluginsDir ) ) {
0 commit comments