Skip to content

Commit

Permalink
Revert to nil if Process.find_executable fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Jul 25, 2024
1 parent e0fa8bb commit a836e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ameba/rule/lint/typos.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a836e2c

Please sign in to comment.