mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-18 10:46:22 +00:00
Better syntax
This commit is contained in:
parent
f58923a36d
commit
7940a29057
12
app.coffee
12
app.coffee
@ -75,8 +75,16 @@ updateRepo = (callback) ->
|
||||
]
|
||||
|
||||
tasks2 = [
|
||||
(callback) -> exec('npm install', cwd: 'hakiapp', callback) if fs.existsSync('package.json') ; callback()
|
||||
(callback) -> exec('foreman start', cwd: 'hakiapp', callback) if fs.existsSync('Procfile') ; callback()
|
||||
(callback) ->
|
||||
if fs.existsSync('package.json')
|
||||
exec('npm install', cwd: 'hakiapp', callback)
|
||||
else
|
||||
callback()
|
||||
(callback) ->
|
||||
if fs.existsSync('Procfile')
|
||||
exec('foreman start', cwd: 'hakiapp', callback)
|
||||
else
|
||||
callback()
|
||||
]
|
||||
|
||||
async.waterfall(tasks1, (error, hash) ->
|
||||
|
Loading…
Reference in New Issue
Block a user