Skip to content

Commit b3fa636

Browse files
committed
Always use bundled Tapioca version
1 parent 107bee8 commit b3fa636

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

lib/spoom/cli/srb/sigs.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,20 @@ class Module; include T::Sig; end
141141

142142
# Now we create a new context to import our modified gem and run tapioca
143143
say("Running Tapioca...")
144+
tapioca_specs = Bundler.load.gems["tapioca"]
145+
if tapioca_specs.size > 1
146+
raise <<~MSG
147+
More than one Tapioca version found in the Bundle:
148+
#{tapioca_specs.sort_by(&:version).map { |s| " - tapioca #{s.version}" }.join("\n")}
149+
MSG
150+
end
151+
144152
tapioca_context = Spoom::Context.mktmp!
145153
tapioca_context.write!("Gemfile", <<~RB)
146154
source "https://rubygems.org"
147155
148156
gem "rbs", ">= 4.0.0.dev.4"
149-
gem "tapioca"
157+
gem "tapioca", "#{tapioca_specs.first.version}"
150158
gem "#{spec.name}", path: "#{copy_context.absolute_path}"
151159
RB
152160
exec(tapioca_context, "bundle install")

0 commit comments

Comments
 (0)