mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[rubygems/rubygems] Have "gem exec" sort executable names in error message.
This decouples `gem exec` behavior (and tests) from the sort order of
the gemspec.
911cd29159
This commit is contained in:
parent
9f17a0c7cb
commit
af594f5166
2 changed files with 2 additions and 2 deletions
|
@ -216,7 +216,7 @@ to the same gem path as user-installed gems.
|
|||
|
||||
if spec.executables.size > 1
|
||||
alert_error "Ambiguous which executable from gem `#{executable}` should be run: " \
|
||||
"the options are #{spec.executables}, specify one via COMMAND, and use `-g` and `-v` to specify gem and version"
|
||||
"the options are #{spec.executables.sort}, specify one via COMMAND, and use `-g` and `-v` to specify gem and version"
|
||||
terminate_interaction 1
|
||||
end
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
|
|||
@cmd.invoke "a:2"
|
||||
end
|
||||
assert_equal 1, e.exit_code
|
||||
assert_equal "ERROR: Ambiguous which executable from gem `a` should be run: the options are [\"foo\", \"bar\"], specify one via COMMAND, and use `-g` and `-v` to specify gem and version\n", @ui.error
|
||||
assert_equal "ERROR: Ambiguous which executable from gem `a` should be run: the options are [\"bar\", \"foo\"], specify one via COMMAND, and use `-g` and `-v` to specify gem and version\n", @ui.error
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue