From 1e6aed0cab1554ff5093ce66278d45813471a223 Mon Sep 17 00:00:00 2001 From: Yuji Ueki Date: Sun, 23 Jul 2023 05:39:47 +0900 Subject: [PATCH] :shirt: Obey Rubocop --- lib/terminal_image.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/terminal_image.rb b/lib/terminal_image.rb index 3e73bb6..46c8f59 100644 --- a/lib/terminal_image.rb +++ b/lib/terminal_image.rb @@ -28,7 +28,7 @@ def encode_url(url) end def encode(file) - if ENV['TERM_PROGRAM'] == 'iTerm.app' + if ENV.fetch('TERM_PROGRAM', nil) == 'iTerm.app' encode_for_iterm2(file) elsif which 'img2sixel' encode_for_libsixel(file)