@@ -49,16 +49,33 @@ function boxExecute(resource_path, command, commandbox_home) {
4949 var cfml_path = path . join ( resource_path , 'cfml' ) ;
5050 var cmd = `cd "${ cfml_path } " && "${ java_path } " -jar "${ box_path } " ${ properites_data } ${ command } ` ;
5151 console . log ( cmd ) ;
52- execute ( cmd , ( output ) => {
53- console . log ( output )
52+ execute ( cmd , ( output , failed ) => {
53+ console . log ( output ) ;
5454 } )
5555 } ) ;
5656}
5757
5858function execute ( command , callback ) {
5959 exec ( command , ( error , stdout , stderr ) => {
60- if ( error ) callback ( error )
61- if ( stderr ) callback ( stderr )
62- if ( stdout ) callback ( stdout )
60+ if ( error ) {
61+ if ( stdout ) {
62+ dialog . showMessageBox ( {
63+ title : 'Failed to Start CommandBox' ,
64+ message : 'Failed to Start CommandBox' ,
65+ detail : stdout . toString ( )
66+ } ) ;
67+ }
68+ callback ( error , true ) ;
69+
70+ }
71+ if ( stderr ) {
72+ callback ( stderr , true ) ;
73+ dialog . showMessageBox ( {
74+ title : 'Failed to Start CommandBox' ,
75+ message : 'Failed to Start CommandBox' ,
76+ detail : stderr . toString ( )
77+ } ) ;
78+ }
79+ if ( stdout ) callback ( stdout , false )
6380 } )
6481}
0 commit comments