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

rg --help outputs search results #439

Closed
bluss opened this issue Apr 5, 2017 · 13 comments
Closed

rg --help outputs search results #439

bluss opened this issue Apr 5, 2017 · 13 comments
Labels
bug A bug.

Comments

@bluss
Copy link

bluss commented Apr 5, 2017

I don't understand this.

rg 0.5.0 installed using cargo install -f ripgrep compiled using rustc 1.18.0-nightly (5309a3e31 2017-04-03) platform: Linux x86-64.

~/.cargo/bin/rg -h outputs the help as expected, ~/.cargo/bin/rg --help outputs..something that looks like every line of all the files?

@kbknapp
Copy link
Contributor

kbknapp commented Apr 5, 2017

cargo install doesn't use/respect the Cargo.lock (TMK). See #438 for details on this issue.

@BurntSushi
Copy link
Owner

Strange. I can't seem to reproduce. There's been a little bit of churn lately on handling -h/--help, so I wonder if compiling from master has the same bug. Would you be willing to try that?

@BurntSushi
Copy link
Owner

@kbknapp Oh. Derp. Thanks for that reminder. :-)

@BurntSushi
Copy link
Owner

I can't seem to reproduce.

Of course, I didn't use the same steps as @bluss. Instead, I did this, which I thought was equivalent before @kbknapp's reminder:

$ git clone git://github.com/BurntSushi/ripgrep
$ cd ripgrep
$ git checkout 0.5.0
$ cargo build --release
$ ./target/release/rg --help

@kbknapp
Copy link
Contributor

kbknapp commented Apr 5, 2017

I just pushed the new version to crates.io so once the ripgrep tests pass it should be safe to merge ;-)

@BurntSushi
Copy link
Owner

OK, the PR is merged. I will close this one out once I put out a new release of ripgrep and test that cargo install works. Thanks again @kbknapp!

@bluss
Copy link
Author

bluss commented Apr 5, 2017

Cool. What does cargo install --locked do? It's not entirely clear.

@bluss
Copy link
Author

bluss commented Apr 5, 2017

I'm confused too, was just looking at cargo install and wondering if it were possible to ask it to respect the lock file. Then I learned it's not packaged.

@kbknapp
Copy link
Contributor

kbknapp commented Apr 5, 2017

What does cargo install --locked do? It's not entirely clear.
[..] was just looking at cargo install and wondering if it were possible to ask it to respect the lock file. Then I learned it's not packaged.

So, the Cargo.lock is never packaged? I'm wondering what --locked and --frozen do too, then. Seems strange to me, as it's pretty much the whole purpose for binaries so that things like this exact issue don't happen. I'd have thought (before just recently) that it'd be the default for cargo install

@yarko
Copy link

yarko commented Apr 9, 2017

glad that simply following @BurntSushi 's clone/build idiom works for just copying the built command into place.

@BurntSushi BurntSushi added the bug A bug. label Apr 9, 2017
@BurntSushi
Copy link
Owner

I can confirm that cargo install ripgrep now works in 0.5.1. Thanks for the report @bluss!

@bluss
Copy link
Author

bluss commented Apr 9, 2017

Thanks for fixing. I'm glad you continue to support cargo install, it's very convenient.. for rusties.

@bluss
Copy link
Author

bluss commented Apr 9, 2017

Fix confirmed on this end, by the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug.
Projects
None yet
Development

No branches or pull requests

4 participants