File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -124,16 +124,29 @@ class FactoryDaemon {
124
124
const node = new Daemon ( options )
125
125
126
126
series ( [
127
-
128
- // TODO if init fails, check if it was because the
129
- // repo was already was inited, if yes, continue
130
127
( cb ) => options . init
131
- ? node . init ( options . initOptions , cb )
128
+ ? node . init ( options . initOptions , ( err ) => {
129
+ if ( err ) {
130
+ console . log ( err )
131
+ // TODO if init fails, check if it was because the
132
+ // repo was already was inited, if yes, continue
133
+ cb ( err )
134
+ } else {
135
+ cb ( )
136
+ }
137
+ } )
132
138
: cb ( null , node ) ,
133
- // TODO if start fails, check if it was because there
134
- // is a daemon already running and connect to it instead
135
139
( cb ) => options . start
136
- ? node . start ( options . args , cb )
140
+ ? node . start ( options . args , ( err ) => {
141
+ if ( err ) {
142
+ console . log ( err )
143
+ // TODO if start fails, check if it was because there
144
+ // is a daemon already running and connect to it instead
145
+ cb ( err )
146
+ } else {
147
+ cb ( )
148
+ }
149
+ } )
137
150
: cb ( )
138
151
] , ( err ) => {
139
152
if ( err ) { return callback ( err ) }
You can’t perform that action at this time.
0 commit comments