fix(configure): do not check return status in git grep

It will throw error (return 1) if no matches are found.
https://github.com/khuedoan/homelab/issues/47
This commit is contained in:
Khue Doan 2022-02-21 21:52:38 +07:00
parent 868e6bf7ae
commit 03ee03ffee

View File

@ -28,8 +28,7 @@ def find_and_replace(pattern: str, replacement: str, paths: list[str]) -> None:
files_with_matches = subprocess.run( files_with_matches = subprocess.run(
["git", "grep", "--files-with-matches", pattern, "--"] + paths, ["git", "grep", "--files-with-matches", pattern, "--"] + paths,
capture_output=True, capture_output=True,
text=True, text=True
check=True
).stdout.splitlines() ).stdout.splitlines()
for file_with_maches in files_with_matches: for file_with_maches in files_with_matches: