Skip to content

Commit a211d03

Browse files
committed
Updated command? for Windows
1 parent 35250b1 commit a211d03

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/jekyll_picture_tag/parsers/image_backend.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ def alternates
6969
end
7070

7171
def command?(command)
72-
system("which #{command} > /dev/null 2>&1")
72+
is_windows = RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
73+
if is_windows
74+
system("where #{command} > NUL 2>&1")
75+
else
76+
system("which #{command} > /dev/null 2>&1")
77+
end
7378
end
7479
end
7580
end

0 commit comments

Comments
 (0)