Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 540a77d

Browse files
author
Alan Shaw
committed
refactor: clean up
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 76a6930 commit 540a77d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/cli/bin.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ async function main (args) {
6565
debug(err)
6666

6767
// the argument can have a different shape depending on where the error came from
68-
if (err.message) {
69-
print(err.message)
70-
} else if (err.error && err.error.message) {
71-
print(err.error.message)
68+
if (err.message || (err.error && err.error.message)) {
69+
print(err.message || err.error.message)
7270
} else {
7371
print('Unknown error, please re-run the command with DEBUG=ipfs:cli to see debug output')
7472
}

src/cli/commands/daemon.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ module.exports = {
6767
print('Daemon is ready')
6868

6969
const cleanup = async () => {
70-
print(`Received interrupt signal, shutting down..`)
70+
print(`Received interrupt signal, shutting down...`)
7171
await api.stop()
7272
process.exit(0)
7373
}

0 commit comments

Comments
 (0)