Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/rbs/cli_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def refute_cli_success(exit_status = nil, &)
# with a version mismatch error when `RUBYLIB` points at the standard library of the running Ruby.
# That is what happens in ruby/ruby CI, where the tests run with a freshly built `ruby`.
#
BUNDLE_COMMAND = [RbConfig.ruby, "-S", "bundle"]
RUBY_EXECUTABLE = ENV["RUBY"] || RbConfig.ruby

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the comment above to explain (what you already have in the PR description)

BUNDLE_COMMAND = [RUBY_EXECUTABLE, "-S", "bundle"]

# Run `rbs collection` with fresh bundler environment
#
Expand All @@ -54,7 +55,7 @@ def run_rbs_collection(*commands, bundler:)
rbs_path << (":" + rblib)
end

Open3.capture3({ "RUBYLIB" => rbs_path }, *bundle_exec, RbConfig.ruby, "#{__dir__}/../../exe/rbs", "--log-level=debug", "collection", *commands, chdir: Dir.pwd)
Open3.capture3({ "RUBYLIB" => rbs_path }, *bundle_exec, RUBY_EXECUTABLE, "#{__dir__}/../../exe/rbs", "--log-level=debug", "collection", *commands, chdir: Dir.pwd)
end

if block_given?
Expand Down
Loading