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 explanatory error message for puls exec command #2

Open
visortelle opened this issue Apr 26, 2024 · 1 comment
Open

Add explanatory error message for puls exec command #2

visortelle opened this issue Apr 26, 2024 · 1 comment

Comments

@visortelle
Copy link
Member

visortelle commented Apr 26, 2024

Reported by @jak78

Looks like puls exec does not accept an instance name:
$ puls exec multinode pulsar-admin
stat /Users/.../.config/puls/instances/default/docker-compose.yml: no such file or directory

...
replace the error with a clear, explanatory message
...
That could be sth like:
 default instance not found. Please create one first using puls create. Alternatively, you can specify an instance with the --instance flag
@visortelle
Copy link
Member Author

In the case above, multinode is treated as a command and pulsar-admin as the command's argument.

The exec command allows to specify an instance by using the --instance argument. Another option is to use puls set-default-instance <instance_name> command.

Usage: puls exec [OPTIONS]

Options:
      --instance <INSTANCE>  Pulsar instance name
      --cluster <CLUSTER>    Cluster index, e.g. 0, 1, 2
  -h, --help                 Print help
  -V, --version              Print version

I think the initial confusion comes from the exec command doesn't print help if no arguments were provided. It should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant