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

Commit ea339df

Browse files
author
Alan Shaw
committed
refactor: clean up
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 05ed837 commit ea339df

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
@@ -60,7 +60,7 @@ module.exports = {
6060
print('Daemon is ready')
6161

6262
const cleanup = async () => {
63-
print(`Received interrupt signal, shutting down..`)
63+
print(`Received interrupt signal, shutting down...`)
6464
await promisify(httpAPI.stop)()
6565
process.exit(0)
6666
}

0 commit comments

Comments
 (0)