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

near shell fails silently and unhelpfully in case command is not recognized #50

Closed
janedegtiareva opened this issue Jun 6, 2019 · 4 comments
Assignees
Labels
P1 High priority

Comments

@janedegtiareva
Copy link
Contributor

steps to repro:
near blahblah
outputs nothing

instead, should say something about unrecognized command.

This used to work before

@behaviary
Copy link
Contributor

Expected behavior:

near not_a_command

output:
[all the help docs]

@vgrichina
Copy link
Contributor

@potatodepaulo this has a fix #51 but we'll need to change how config is loaded. Otherwise extra options in config will cause failures.

@kcole16
Copy link

kcole16 commented Jan 22, 2020

Now getting this when typing near not_a_command

[WARNING] Didn't find config at /Users/kendallcole/Desktop/near/src/config, using default shell config
{
  networkId: 'default',
  nodeUrl: 'https://rpc.nearprotocol.com',
  contractName: 'near-hello-devnet',
  walletUrl: 'https://wallet.nearprotocol.com'
}

@mikedotexe mikedotexe self-assigned this Feb 5, 2020
@mikedotexe
Copy link
Contributor

Also related to issue Illia created:
#259

There are a links that address this issue and I've done work to find a happy medium.

@potatodepaulo mentioned it would be nice to have the options when you enter an invalid command. My approach will tell the user what command was invalid very tersely and obviously to the end user. They can type near or near --help to see the full list of commands.
In terms of what @kcole16 mentioned, I think we'll want to keep that, but it'll be above the more helpful errors informing the user of their incorrect usage.

Screenshot 2020-02-05 11.01.17.png

This ended up being a rather interesting problem. Please see my pull request here which is ready for review:
#262
(PS - I'm not sure why Travis is failing, but I don't believe it's something in the PR)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 High priority
Projects
None yet
Development

No branches or pull requests

6 participants