Skip to content

Commit 17dbc3f

Browse files
committed
🐛 Make sure grep uses extended regex syntax
Otherwise it will complain about the escaped brackets. We do WANT to escape them though since we want to use the same pattern also in our fallback implementation in case grep isn't available. Closes #2
1 parent 3f83697 commit 17dbc3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

octoprint_file_check/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def _search_through_file(self, path, term, incl_comments=False):
8484

8585
try:
8686
# try native grep
87-
result = sarge.run(["grep", "-q", pattern, path])
87+
result = sarge.run(["grep", "-q", "-E", pattern, path])
8888
return result.returncode == 0
8989
except ValueError as exc:
9090
if "Command not found" in str(exc):

0 commit comments

Comments
 (0)