Skip to content

Commit

Permalink
Improve vertical alignment of the notifier output (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
astorije committed Aug 16, 2020
1 parent 71a3f19 commit f42fc8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -63,7 +63,7 @@ class UpdateNotifier {
chalk().cyan(format(' sudo chown -R $USER:$(id -gn $USER) %s ', xdgBasedir().config));

process.on('exit', () => {
console.error('\n' + boxen()(message, {align: 'center'}));
console.error(boxen()(message, {align: 'center'}));
});
}
}
Expand Down Expand Up @@ -151,7 +151,7 @@ class UpdateNotifier {
borderStyle: 'round'
};

const message = '\n' + boxen()(
const message = boxen()(
pupa()(template, {
packageName: this.packageName,
currentVersion: this.update.current,
Expand Down
2 changes: 0 additions & 2 deletions test/notify.js
Expand Up @@ -47,7 +47,6 @@ test('use pretty boxen message by default', t => {
notifier.notify({defer: false, isGlobal: true});

t.is(stripAnsi(errorLogs), `
╭───────────────────────────────────────────────────╮
│ │
│ Update available 0.0.2 → 1.0.0 │
Expand Down Expand Up @@ -83,7 +82,6 @@ test('supports message with placeholders', t => {
});

t.is(stripAnsi(errorLogs), `
╭─────────────────────────────────────────────────────╮
│ │
│ Package Name: update-notifier-tester │
Expand Down

0 comments on commit f42fc8f

Please sign in to comment.