Fixes Homebrew/homebrew#31156. Closes Homebrew/homebrew#47246. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>