diff --git a/spec/mspec/lib/mspec/utils/script.rb b/spec/mspec/lib/mspec/utils/script.rb index b9f8b17fdc..dd1603c20a 100644 --- a/spec/mspec/lib/mspec/utils/script.rb +++ b/spec/mspec/lib/mspec/utils/script.rb @@ -84,7 +84,12 @@ class MSpecScript names.each do |name| config[:path].each do |dir| - file = File.expand_path name, dir + begin + file = File.expand_path name, dir + rescue ArgumentError + # File.expand_path can issue error e.g. if HOME is not available + next + end if @loaded.include?(file) return true elsif File.exist? file