Merge pull request #465 from crystal-ameba/fix-issue-464

Revert to `nil` in `Rule::Lint::Typos.BIN_PATH` if `Process.find_executable` fails
This commit is contained in:
Sijawusz Pur Rahnama 2024-07-25 14:26:44 +02:00 committed by GitHub
commit a42b218ca6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ module Ameba::Rule::Lint
MSG = "Typo found: %s -> %s"
BIN_PATH = Process.find_executable("typos")
BIN_PATH = Process.find_executable("typos") rescue nil
def bin_path : String?
@bin_path || BIN_PATH