beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 140 forks source link

Error finding default ackrc on Windows #467

Closed romary22 closed 10 years ago

romary22 commented 10 years ago

There is an error using ack 2.12 on Windows 7

d:>ack something Can't use string ("C:\ProgramData\ackrc") as a HASH ref while "strict refs" in use at C:/Perl64/site/lib/App/Ack/ConfigLoader.pm line 738. d:>ack --version ack 2.12 Running under Perl 5.16.3 at C:\Perl64\bin\perl.exe

I have traced the error in ConfigFinder.pm _remove_redundancies which doesn't return a hash for windows.

romary22 commented 10 years ago

I just found that the last version on Github has a correction for it.

petdance commented 10 years ago

I really need to get out a new beta.:-/

blatx commented 10 years ago

The "fix" on Windows is a bit lazy.

On Windows:

So, to dedup files from a list on Windows, you can do something like this, in App::Ack::ConfigFinder::_remove_redundancies:

 ($key = lc($key)) =~ tr:/:\\:;