Skip to content

Commit 98c69c5

Browse files
committed
Validates if rbs is installed when Steepfile is loaded
1 parent 3da1790 commit 98c69c5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/steep/drivers/utils/driver_helper.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ def load_config(path: steepfile || Pathname("Steepfile"))
1010
steep_file_path = path.absolute? ? path : Pathname.pwd + path
1111
Project.new(steepfile_path: steep_file_path).tap do |project|
1212
Project::DSL.parse(project, path.read, filename: path.to_s)
13+
14+
project.targets.each do |target|
15+
if collection_lock = target.options.collection_lock
16+
begin
17+
collection_lock.check_rbs_availability!
18+
rescue RBS::Collection::Config::CollectionNotAvailable
19+
raise "Run `rbs collection install` to install type definitions"
20+
end
21+
end
22+
end
1323
end
1424
end
1525

sig/steep/project/options.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module Steep
1919

2020
attr_accessor paths: PathOptions
2121

22-
attr_accessor collection_lock: RBS::Collection::Config::Lockfile
22+
attr_accessor collection_lock: RBS::Collection::Config::Lockfile?
2323

2424
def initialize: () -> void
2525
end

0 commit comments

Comments
 (0)