boozook / playdate

Playdate Build Tools and API
https://mastodon.gamedev.place/@pd
MIT License
133 stars 8 forks source link

Unable to pass options whether using `cargo playdate` or `cargo-playdate` #395

Closed paulyoung closed 1 month ago

paulyoung commented 2 months ago
$ cargo playdate new --help                                                                                                                                                                                                              
Create a new cargo package at <path>

Usage: cargo playdate new [OPTIONS] <path>

Arguments:
  <path>

Options:
  -n, --dry-run
          Enable dry-run mod
$ cargo playdate new --dry-run crates/demo                                                                                                                                                                                                      
    Creating library (default).
error: unexpected argument '--dry-run' found

  tip: to pass '--dry-run' as a value, use '-- --dry-run'

Usage: cargo new [OPTIONS] <PATH>

I've tried various things and haven't been able to figure out how to get this to work.

cargo-playdate --dry-run new crates/demo also doesn't work.

boozook commented 1 month ago

The cargo-playdate mostly works as proxy passing given args to your host cargo, in case of commands new & init.

Cargo doesn't support --dry-run for new and init commands (see cargo new --help).

So the problem is that the --dry-run parameter is marked as global, but it should not be for these commands.