Skip to content

Commit

Permalink
Fixing a missing MOTD issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pazdera committed Nov 29, 2017
1 parent c771413 commit f170f52
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 6 additions & 2 deletions bin/kart
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ let argv = yargs
}, (argv) => {
console.log('kart: Making a release');
kart.getMOTD().then((motd) => {
console.log("\n" + motd + "\n");
if (motd) {
console.log("\n" + motd + "\n");
}

return release(argv).catch((err) => {
console.log(err);
Expand All @@ -301,7 +303,9 @@ let argv = yargs
}, (argv) => {
console.log('kart: Showing status for channel');
kart.getMOTD().then((motd) => {
console.log("\n" + motd + "\n");
if (motd) {
console.log("\n" + motd + "\n");
}

status(argv).catch((err) => {
console.log(err);
Expand Down
3 changes: 1 addition & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ function getMOTD() {

if (motd) {
motd = motd.replace("\\n", "\n");
motd = motd.split("\n").map(l => `[${'MOTD'.green}]: ${l}`).join("\n");
}

motd = motd.split("\n").map(l => `[${'MOTD'.green}]: ${l}`).join("\n");

return Promise.resolve(motd);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kart",
"version": "0.4.0",
"version": "0.4.1",
"description": "Kano Archive and Release Tool. Managing releases mainly of static websites.",
"main": "lib/index.js",
"bin": {
Expand Down

0 comments on commit f170f52

Please sign in to comment.