File.realpath can raise ENOTDIR
This commit is contained in:
parent
5ad2dfd8dc
commit
a1a198d03a
@ -191,7 +191,7 @@ class MSpecScript
|
|||||||
patterns.each do |pattern|
|
patterns.each do |pattern|
|
||||||
begin
|
begin
|
||||||
expanded = File.realpath(pattern)
|
expanded = File.realpath(pattern)
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT, Errno::ENOTDIR
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
if File.file?(expanded) && expanded.end_with?('.rb')
|
if File.file?(expanded) && expanded.end_with?('.rb')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user