hythm7 / Pakku

Package Manager for the Raku Programming Language
Artistic License 2.0
26 stars 3 forks source link

Wrongly using a command should only output help for it #24

Closed demostanis closed 3 years ago

demostanis commented 3 years ago

Currently, when misusing a command (e.g. giving wrong number of arguments), Pakku will output help for every command. It should (well, IMHO) only output help for the misused command. pakku add Expected:

Add: 
Add distribution

Examples:
[...]

Actual:

Add: 
Add distribution

Examples:
[...]

Remove: 
Remove distribution

Examples:
[...]
hythm7 commented 3 years ago

The example you gave works as expected on my machine, can you give another example for the issue?

misusing add:

> pakku add
Add: 
Add distribution

Examples:
pakku add MyModule
pakku add nodeps MyModule
pakku add notest MyModule
pakku add exclude Dep MyModule
pakku add to     /opt/MyApp MyModule
pakku add force  to   home  MyModule1 MyModule2

Options:
deps            → add dependencies
nodeps          → dont add dependencies
deps requires   → add required dependencies only
deps recommends → add required and recommended dependencies
deps only       → dont add the dist, only dependencies
build           → build distribution
nobuild         → bypass build
test            → test distribution
notest          → bypass test
force           → force add distribution even if installed
noforce         → no force
exclude <dep>   → add distribution but exclude specific dep
to <repo>       → add distribution to repo <home site vendor core /path/to/MyApp>

-Ofun
>

misusing remove:


> pakku remove
Remove: 
Remove distribution

Examples:
pakku remove MyModule

Options:
from <repo> → remove distribution from provided repo only

-Ofun
> 
demostanis commented 3 years ago

It seems to be happening with pakku please nopretty add

hythm7 commented 3 years ago

Fixed. Thanks.

hythm7 commented 3 years ago

Closing. Please re-open in case there is still an issue. Thanks.