mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-03-21 03:25:37 +00:00
Merge pull request #148 from resin-io/jviotti/fix/14/logs-history
Force logs command to exit when not in --tail mode. Fix #14.
This commit is contained in:
commit
abf5740950
@ -24,7 +24,9 @@
|
||||
return console.log(line.message);
|
||||
});
|
||||
if (!options.tail) {
|
||||
return promise.nodeify(done);
|
||||
return promise["catch"](done)["finally"](function() {
|
||||
return process.exit(0);
|
||||
});
|
||||
}
|
||||
return promise.then(function() {
|
||||
return resin.logs.subscribe(params.uuid).then(function(logs) {
|
||||
|
@ -34,7 +34,12 @@ module.exports =
|
||||
console.log(line.message)
|
||||
|
||||
if not options.tail
|
||||
return promise.nodeify(done)
|
||||
|
||||
# PubNub keeps the process alive after a history query.
|
||||
# Until this is fixed, we force the process to exit.
|
||||
# This of course prevents this command to be used programatically
|
||||
return promise.catch(done).finally ->
|
||||
process.exit(0)
|
||||
|
||||
promise.then ->
|
||||
resin.logs.subscribe(params.uuid).then (logs) ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user