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

cargo-machette is both a cargo subcommand a direct command except when it isn't #22

Closed
epage opened this issue Apr 27, 2022 · 1 comment · Fixed by #51
Closed

cargo-machette is both a cargo subcommand a direct command except when it isn't #22

epage opened this issue Apr 27, 2022 · 1 comment · Fixed by #51
Assignees

Comments

@epage
Copy link

epage commented Apr 27, 2022

    // ...and the "machete" command if ran as cargo subcommand.
    if i == 1 && arg == "machete" {
        continue;
    }

Since your command accepts positional arguments, this will not allow me to run cargo-machette machette where machette is a directory but I'd have to know to run cargo-machette machette machette. Personally, I find it dubious to have a command be dual natured (run in either cargo or out) especially when accepting positional arguments.

@bnjbvr
Copy link
Owner

bnjbvr commented Apr 29, 2022

You're very right. I didn't quite know how other tools handle this in particular, so I'm happy taking whichever approach is the most appropriate here!

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

Successfully merging a pull request may close this issue.

2 participants