From a836e2c8d07eab17b5b7d270b0ea800219d9fa08 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Thu, 25 Jul 2024 13:33:31 +0200 Subject: [PATCH] Revert to `nil` if `Process.find_executable` fails --- src/ameba/rule/lint/typos.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ameba/rule/lint/typos.cr b/src/ameba/rule/lint/typos.cr index 2371aff1..8a2506e9 100644 --- a/src/ameba/rule/lint/typos.cr +++ b/src/ameba/rule/lint/typos.cr @@ -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