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

fix: pkg-fmt parsing should be case insensitive #384

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

azzamsa
Copy link
Contributor

@azzamsa azzamsa commented Sep 15, 2022

Fixes: #377

Before;

❯ cargo run fnm --no-symlinks --pkg-url="https://github.com/Schniz/fnm/releases/download/v1.31.1/fnm-linux.zip" --pkg-fmt zip --bin-dir "{ bin }" --install-path /tmp/foo
    Finished dev [unoptimized + debuginfo] target(s) in 0.17s
     Running `/home/user/playground/cargo-binstall/target/debug/cargo-binstall fnm --no-symlinks '--pkg-url=https://github.com/Schniz/fnm/releases/download/v1.31.1/fnm-linux.zip' --pkg-fmt zip --bin-dir '{ bin }' --install-path /tmp/foo`
error: Invalid value "zip" for '--pkg-fmt <PKG_FMT>': Matching variant not found

For more information try --help

After:

❯ cargo run fnm --no-symlinks --pkg-url="https://github.com/Schniz/fnm/releases/download/v1.31.1/fnm-linux.zip" --pkg-fmt zip --bin-dir "{ bin }" --install-path /tmp/foo
   Compiling binstalk v0.1.0 (/home/user/playground/cargo-binstall/crates/binstalk)
   Compiling cargo-binstall v0.13.0 (/home/user/playground/cargo-binstall/crates/bin)
    Finished dev [unoptimized + debuginfo] target(s) in 5.45s
     Running `/home/user/playground/cargo-binstall/target/debug/cargo-binstall fnm --no-symlinks '--pkg-url=https://github.com/Schniz/fnm/releases/download/v1.31.1/fnm-linux.zip' --pkg-fmt zip --bin-dir '{ bin }' --install-path /tmp/foo`
02:07:27 [INFO] Resolving package: 'fnm'
02:07:30 [INFO] The package will be downloaded from github.com
02:07:30 [INFO] This will install the following binaries:
02:07:30 [INFO]   - fnm (fnm -> /tmp/foo/fnm-v1.31.1)
Do you wish to continue? yes/[no]
? ^C02:07:30 [WARN] Installation cancelled

@NobodyXu NobodyXu enabled auto-merge (squash) September 15, 2022 02:17
@NobodyXu NobodyXu merged commit 0e68c0f into cargo-bins:main Sep 15, 2022
@azzamsa azzamsa deleted the pkg-fmt-case-insensitive branch September 15, 2022 10:32
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 this pull request may close these issues.

pkg-fmt parsing should be case insensitive
2 participants