From 693c753acd8e6a3cefab268cdf6b1e89170e073a Mon Sep 17 00:00:00 2001 From: Pavel Beliaev Date: Wed, 17 Mar 2021 12:03:35 +0300 Subject: [PATCH] Fix the case when a file from diff does not exist in a container (More details: https://github.com/prontolabs/pronto/issues/338) --- lib/pronto/runner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pronto/runner.rb b/lib/pronto/runner.rb index d787ec8d..168aa648 100644 --- a/lib/pronto/runner.rb +++ b/lib/pronto/runner.rb @@ -53,7 +53,7 @@ def gem_file?(path) end def ruby_executable?(path) - return false if File.directory?(path) + return false unless File.file?(path) line = File.open(path, &:readline) line =~ /#!.*ruby/ rescue ArgumentError, EOFError