Skip to content

Commit 27c3fd1

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

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/spoom/cli/srb/sigs.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,19 @@ 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
144151
tapioca_context = Spoom::Context.mktmp!
145152
tapioca_context.write!("Gemfile", <<~RB)
146153
source "https://rubygems.org"
147154
148155
gem "rbs", ">= 4.0.0.dev.4"
149-
gem "tapioca"
156+
gem "tapioca", "#{tapioca_specs.first.version}"
150157
gem "#{spec.name}", path: "#{copy_context.absolute_path}"
151158
RB
152159
exec(tapioca_context, "bundle install")

0 commit comments

Comments
 (0)