cabal-club / cabal-cli

Terminal client for Cabal, the p2p chat platform.

Home Page:https://cabal.chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"/add abcd" crashes cabal-cli

rinchen opened this issue · comments

  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?

Still happening on cli 13.3.6

thanks for the confirmation @marcodeppe