Skip to content

Commit

Permalink
process
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Sep 29, 2016
1 parent b621354 commit e9468ec
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/cli/helpers/abe-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,23 @@ function prepend(value, array) {

var abeProcess = function(name, args = []) {
args = prepend(`ABE_WEBSITE=${config.root}`, args)
args = prepend(`ABEJS_PATH=${__dirname}/../../../dist`, args)

var file = `${__dirname}/../../cli/process/${name}.js`
console.log('* * * * * * * * * * * * * * * * * * * * * * * * * * * * *')
console.log('file', file)
try {
var stats = fse.statSync(file)
if (stats.isFile()) {
process.fork(file, args)
}
}catch(err) {
file = Plugins.instance.getProcess(name)
var stats = fse.statSync(file)
if (stats.isFile()) {
process.fork(file, args)
try {
file = Plugins.instance.getProcess(name)
var stats = fse.statSync(file)
if (stats.isFile()) {
process.fork(file, args)
}
}catch(err) {

}
}
}
Expand Down

0 comments on commit e9468ec

Please sign in to comment.