Skip to content

Commit

Permalink
Merge pull request Kong#1069 from Mashape/fix/cli-prepare
Browse files Browse the repository at this point in the history
Closes Kong#1066
  • Loading branch information
subnetmarco committed Mar 11, 2016
2 parents 8b46eeb + 53cfdce commit d0573cf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kong/cli/utils/services.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,13 @@ function _M.start_all(configuration, configuration_path)
end

for _, v in ipairs(services) do
local obj = v(configuration, configuration_path)
obj:prepare()
local ok, err = obj:start()
local service = v(configuration, configuration_path)
local ok, err
ok, err = service:prepare()
if not ok then
return ok, err
end
ok, err = service:start()
if not ok then
return ok, err
end
Expand Down

0 comments on commit d0573cf

Please sign in to comment.