Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def find_files(working_path: Path, current_version: str) -> List[str]:
ui.info_2("Looking for files matching", ui.bold, current_version)
cmd = ["grep", "--fixed-strings", "--files-with-matches", current_version]
_, out = tbump.git.run_git_captured(working_path, *cmd, check=True)
res = [] # type: List[str]
ui.info("Found following matching files")
for file in out.splitlines():
ui.info(" * ", file)
res.append(file)
return res
def run_git_captured(self, *args: str, check: bool = True) -> Tuple[int, str]:
full_args = [self.repo_path] + list(args)
return tbump.git.run_git_captured(*full_args, check=check)