Skip to content

Commit

Permalink
Reports a human-friendly error on bad cabal name.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackergrrl committed Sep 28, 2022
1 parent 80a7448 commit 3abba1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ function start (keys, frontendConfig) {
})
}
}).catch((e) => {
if (e) { console.error(e) } else { console.error("Error: Couldn't resolve one of the following cabal keys:", chalk.yellow(keys.join(' '))) }
if (!e || e.toString() === 'Error: dns failed to resolve') {
console.error("Error: Couldn't resolve one of the following cabal keys:", chalk.yellow(keys.join(' ')))
} else {
console.error(e)
}
process.exit(1)
})
}
Expand Down

0 comments on commit 3abba1c

Please sign in to comment.