Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,20 @@ jobs:
# Important for versioning plugins:
fetch-depth: 0

- name: Install ripgrep
- name: Install ripgrep (Linux and macOS)
if: runner.os != 'Windows'
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
sudo apt-get update
sudo apt-get install -y ripgrep
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
brew install ripgrep
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then
choco install ripgrep
fi

- name: Install ripgrep (Windows)
if: runner.os == 'Windows'
run: choco install ripgrep

- name: Install uv (official Astral action)
uses: astral-sh/setup-uv@v5
with:
Expand Down
3 changes: 1 addition & 2 deletions src/used_addr_check/scan_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def _extract_addresses_from_file_python_re(text_file_path: Path) -> List[str]:
# TODO: could do this in chunks if we wanted, but using ripgrep instead

logger.info("Using Python regex search")
with text_file_path.open("r") as file:
results = re.findall(BITCOIN_ADDR_REGEX, file.read())
results = re.findall(BITCOIN_ADDR_REGEX, text_file_path.read_text(encoding="utf-8"))

return [result[0] for result in results]

Expand Down