diff --git a/src/cli/bin.js b/src/cli/bin.js index ee7d298a3c..597f6e958f 100755 --- a/src/cli/bin.js +++ b/src/cli/bin.js @@ -65,10 +65,8 @@ async function main (args) { debug(err) // the argument can have a different shape depending on where the error came from - if (err.message) { - print(err.message) - } else if (err.error && err.error.message) { - print(err.error.message) + if (err.message || (err.error && err.error.message)) { + print(err.message || err.error.message) } else { print('Unknown error, please re-run the command with DEBUG=ipfs:cli to see debug output') } diff --git a/src/cli/commands/daemon.js b/src/cli/commands/daemon.js index d14dc07bb8..8afcdbe3d6 100644 --- a/src/cli/commands/daemon.js +++ b/src/cli/commands/daemon.js @@ -67,7 +67,7 @@ module.exports = { print('Daemon is ready') const cleanup = async () => { - print(`Received interrupt signal, shutting down..`) + print(`Received interrupt signal, shutting down...`) await api.stop() process.exit(0) }