Revert to nil if Process.find_executable fails

This commit is contained in:
Sijawusz Pur Rahnama 2024-07-25 13:33:31 +02:00
parent e0fa8bbcc2
commit a836e2c8d0

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