phrohdoh / easage

A library that provides programmatic manipulation of BIG archives.
MIT License
9 stars 0 forks source link

easage-unpack: --names cannot be used with specified arguments #43

Open Teteros opened 6 years ago

Teteros commented 6 years ago
$ ./easage unpack --output out --source foo.big --names 'Data/INI/GameData.ini'

error: The argument '--names <names>...' cannot be used with one or more of the other specified arguments

USAGE:
    easage unpack --output <output> --source <source> <--names <names>...|--all>

For more information try --help

From IRC:

@Phrohdoh │ teteros: oh huh
        ⤷ │ that is talking about a mutually exclusive arg
        ⤷ │ maybe a bug in clap
  teteros │ hm
@Phrohdoh │ https://github.com/Phrohdoh/easage/blob/b743a234921720198c0c15b4276e9542b0415b5b/src/bin/easage_unpack.rs#L30-L38
@Phrohdoh │ Also it looks like there is a logic bug in
          │ https://github.com/Phrohdoh/easage/blob/b743a234921720198c0c15b4276e9542b0415b5b/src/bin/easage_unpack.rs#L50-L54
phrohdoh commented 6 years ago

@Teteros I don't currently have any test data so could you try something?

If you remove the following code is this issue resolved?

https://github.com/Phrohdoh/easage/blob/67c2bd92b44e59d838dd0ff42eb8107f5ecc6bff/src/bin/easage_unpack.rs#L39-L41

Teteros commented 6 years ago

Removing above causes --names to neither extract the file nor error out, easage just exits.

It seems to cause the help message (about needing required params --all or --names ) to panic:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:335:21

Test case: ss