We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f6d068 + 6dd1d3d commit de69f3aCopy full SHA for de69f3a
lib/cc/engine/lockfile_specs.rb
@@ -2,14 +2,11 @@
2
3
class LockfileSpecs
4
def initialize(lockfile)
5
- if File.exist?(lockfile)
6
- @contents = File.read(lockfile)
7
- else
8
- @contents = ""
9
- end
+ @contents = File.read(lockfile) if File.exist?(lockfile)
10
end
11
12
def include?(name)
+ return false if @contents.nil?
13
@lockfile ||= Bundler::LockfileParser.new(@contents)
14
@lockfile.specs.any? { |spec| spec.name == name }
15
rescue Bundler::LockfileError
0 commit comments