mirror of https://github.com/embarklabs/embark.git
early return
This commit is contained in:
parent
4db2d40ef5
commit
e35474f726
39
lib/index.js
39
lib/index.js
|
@ -175,14 +175,15 @@ class Embark {
|
|||
// Check storage
|
||||
const platform = engine.config.storageConfig.provider;
|
||||
self._checkStorageEndpoint(engine, platform, (err) => {
|
||||
if (err) {
|
||||
return self._startStorageNode(engine, platform, (err) => {
|
||||
if (err) {
|
||||
engine.logger.error('Error while starting a storage process for ' + platform);
|
||||
engine.logger.error(err);
|
||||
}
|
||||
});
|
||||
if (!err) {
|
||||
return;
|
||||
}
|
||||
self._startStorageNode(engine, platform, (err) => {
|
||||
if (err) {
|
||||
engine.logger.error('Error while starting a storage process for ' + platform);
|
||||
engine.logger.error(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
engine.events.on('outputDone', function () {
|
||||
|
@ -376,22 +377,22 @@ class Embark {
|
|||
const errorObj = {message: __('Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}:{{port}}.', {platform: platform, protocol: engine.config.storageConfig.protocol, host: engine.config.storageConfig.host, port: engine.config.storageConfig.port})};
|
||||
|
||||
self._checkStorageEndpoint(engine, platform, function (err) {
|
||||
if (err) {
|
||||
return self._startStorageNode(engine, platform, (err) => {
|
||||
if (!err) {
|
||||
return callback();
|
||||
}
|
||||
self._startStorageNode(engine, platform, (err) => {
|
||||
if (err) {
|
||||
engine.logger.error(err);
|
||||
return callback(errorObj);
|
||||
}
|
||||
// Check endpoint again to see if really did start
|
||||
self._checkStorageEndpoint(engine, platform, (err) => {
|
||||
if (err) {
|
||||
engine.logger.error(err);
|
||||
return callback(errorObj);
|
||||
}
|
||||
// Check endpoint again to see if really did start
|
||||
self._checkStorageEndpoint(engine, platform, (err) => {
|
||||
if (err) {
|
||||
return callback(errorObj);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
callback();
|
||||
});
|
||||
}
|
||||
callback();
|
||||
});
|
||||
});
|
||||
},
|
||||
function setupStoragePlugin(callback){
|
||||
|
|
|
@ -37,7 +37,7 @@ class StorageProcessesLauncher {
|
|||
modulePath: filePath,
|
||||
logger: self.logger,
|
||||
events: self.events,
|
||||
silent: false,
|
||||
silent: true,
|
||||
exitCallback: self.processExited.bind(this, storageName)
|
||||
});
|
||||
self.processes[storageName].send({
|
||||
|
|
Loading…
Reference in New Issue