Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Commit 3aa8235

Browse files
Handle ack named ack-grep on Ubuntu
1 parent 27c2b8f commit 3aa8235

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

searchengines/ack.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
1616
### End of fixing import paths
1717

1818
import base
19-
19+
import os
2020

2121
class Ack (base.Base):
22-
pass
22+
def __init__(self, settings):
23+
base.Base.__init__(self, settings)
24+
# Ubuntu's ack from repos is called ack-grep by default
25+
if 'Ubuntu' in os.uname().version and self.path_to_executable=='ack' and os.system('which ack-grep')==0:
26+
self.path_to_executable = 'ack-grep'
2327

2428
engine_class = Ack

0 commit comments

Comments
 (0)