Skip to content

Commit

Permalink
fixes failure when no logs are retrieved from server
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcsapo committed Aug 14, 2017
1 parent dc89a0a commit db984f3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 0.1.0
# Unreleased

- fixes failure when no logs are retrieved from server

# 0.1.0 (08/13/2017)

- adds api and cli action to be able retrieve logs
- deals with cleaning up old images
Expand Down
18 changes: 11 additions & 7 deletions bin/deploy-logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ Async.waterfall([
spinner.stop();
const { logs } = result;

console.log( // eslint-disable-line
logs.map((l) => {
let log = l.split(' ');
log.unshift('-');
return log.join(' ');
}).join('')
);
if(logs) {
console.log( // eslint-disable-line
logs.map((l) => {
let log = l.split(' ');
log.unshift('-');
return log.join(' ');
}).join('')
);
} else {
console.log('no logs available 🙈'); // eslint-disable-line
}
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deploy.sh",
"version": "0.0.1",
"version": "0.1.0",
"description": "☁️ open source continuous deployment service",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit db984f3

Please sign in to comment.