@@ -75,8 +75,19 @@ const getConfig = cp.spawn('php', [
7575 'useEEGBrowserVisualizationComponents' ,
7676] , { } ) ;
7777
78+ let EEGVisEnabled = false ;
7879getConfig . stdout . on ( 'data' , ( data ) => {
79- const EEGVisEnabled = JSON . parse ( data ) ;
80+ try {
81+ EEGVisEnabled = JSON . parse ( data ) ;
82+ } catch ( e ) {
83+ console . warn (
84+ '\x1b[33m' ,
85+ 'WARNING: Unable to fetch DB config' ,
86+ 'useEEGBrowserVisualizationComponents' ,
87+ '\x1b[0m' ,
88+ ) ;
89+ }
90+
8091 if ( EEGVisEnabled === 'true' ) {
8192 console . info ( '\n ----- \n >> '
8293 + 'EEG Browser visualization components enabled '
@@ -99,10 +110,12 @@ getConfig.stdout.on('data', (data) => {
99110 ) ;
100111
101112 protoc . on ( 'error' , ( error ) => {
102- console . error ( 'ERROR: '
103- + 'Make sure that protoc '
104- + '(https://github.com/protocolbuffers/protobuf/releases/) '
105- + 'is installed on your system '
113+ console . error (
114+ '\x1b[31m' ,
115+ 'ERROR: Make sure that protoc' ,
116+ '(https://github.com/protocolbuffers/protobuf/releases/)' ,
117+ 'is installed on your system' ,
118+ '\x1b[0m' ,
106119 ) ;
107120 console . error ( error ) ;
108121 } ) ;
0 commit comments