-
Notifications
You must be signed in to change notification settings - Fork 66
-
Notifications
You must be signed in to change notification settings - Fork 66
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
No output when --pager is a missing environment variable #265
Comments
Ah, thanks — that shows the problem. My .ackrc has:
And
The actual problem is that if
An explicit empty string is detected as a problem, and an appropriate message displayed:
Though weirdly only with the supposedly-optional
But an empty environment variable doesn't give either of those, which is unfortunate — but I'm guessing this may not be something that Ack can detect. |
@Smylers This is an interesting issue...I actually had to look at the code to figure out why your ackrc works at all! We don't do any special processing of what the value I'll look into detecting the case that you found; nice catch! |
Unfortunately, it seems that this is an issue with |
I have a vague recollection that when I set that up, it was something I tried on the off-chance, and was pleased that it worked; I think I was otherwise about to wrap
Unless it actually turns out to be an unexpected security risk, of course. Having |
We actually did have a security hole due to |
Seeing as this is a problem we can't really solve, I would like to close this issue. Any objections, @Smylers? |
Let's at least document the behaviour — both the useful feature that I'm happy to submit a patch for that. |
@Smylers I would be happy to merge such a patch =) regarding the wording about interpolation, you might want to mention that --pager is evaluated by the shell, so that users know that both 'less -RM' and '$PAGER' work |
Is this issue waiting on a doc patch alone to be closed? |
Oh, apparently so. Apologies for not having done this, and thank you for the reminder. |
Ack isn't giving me any output when invoked directly with sudo:
As you can see, it works with a root shell (even when
sudo
was used to get that), just not directly withsudo
.I can make the output appear under
sudo
by hackingApp::Ack
to print tostdout
rather than$fh
, changing this:to:
In the Perl debugger I get the same value for
$fh
both with and withoutsudo
, namely:I've found this with
ack
2.04 and 2.12, on Ubuntu 10.04 and 13.10.Sorry I don't have time to dig into this further right now. If you can't reproduce this, let me know and I'll try installing from Git.
The text was updated successfully, but these errors were encountered: