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

Commit

Permalink
Merge pull request #896 from ipfs/fix/daemon-start
Browse files Browse the repository at this point in the history
fix: not masking error message when starting daemon
  • Loading branch information
daviddias authored Jul 4, 2017
2 parents ce504cd + fe48c3e commit ea8de20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cli/commands/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ module.exports = {
httpAPI = new HttpAPI(process.env.IPFS_PATH, argv)

httpAPI.start((err) => {
if (err && err.code === 'ENOENT') {
console.log('Error: no ipfs repo found in ' + repoPath)
if (err && err.code === 'ENOENT' && err.message.match(/Uninitalized repo/i)) {
console.log('Error: no initialized ipfs repo found in ' + repoPath)
console.log('please run: jsipfs init')
process.exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion test/cli/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('daemon', () => {
afterEach(() => clean(repoPath))

it('gives error if user hasn\'t run init before', (done) => {
const expectedError = 'no ipfs repo found in ' + repoPath
const expectedError = 'no initialized ipfs repo found in ' + repoPath

ipfs('daemon').catch((err) => {
expect(err.stdout).to.have.string(expectedError)
Expand Down

0 comments on commit ea8de20

Please sign in to comment.