Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"/add abcd" crashes cabal-cli #180

Open
rinchen opened this issue May 6, 2020 · 3 comments
Open

"/add abcd" crashes cabal-cli #180

rinchen opened this issue May 6, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@rinchen
Copy link

rinchen commented May 6, 2020

  1. Launch Cabal and join the public chat
  2. Navigate to the status channel
  3. Type "/add abcd"

Result:
(node:27347) UnhandledPromiseRejectionWarning: Error: dns failed to resolve at /Users/joey/.nvm/versions/node/v12.14.1/lib/node_modules/cabal/node_modules/cabal-client/src/client.js:156:38 at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:94:5) (node:27347) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:27347) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

If I'm reading the code correctly, the cli calls cabal-client:commands.js and runs cabal.client.addCabal. When that executes at https://github.com/cabal-club/cabal-client/blob/b23a45b7e2a96fea9820193ebbf0c2d1e37f77f0/src/client.js#L134 it doesn't call cabal-core's isHyperCoreKey https://github.com/cabal-club/cabal-core/blob/9a0f6e7395ed707d1f348b0049ce20f199cfcfe9/index.js#L224 to verify that what we are passing is a valid key (just a string). My guess is that this is so we can deal with aliases?

@todrobbins todrobbins added the bug Something isn't working label May 21, 2020
@marcodeppe
Copy link

Still happening on cli 13.3.6

@cblgh
Copy link
Member

cblgh commented Jan 12, 2021

thanks for the confirmation @marcodeppe

@hackergrrl
Copy link
Member

hackergrrl commented Sep 2, 2024

Still true in 15.0.2. cabal-client is returning the failed promise in cabal/node_modules/cabal-client/src/client.js:282.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants