[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. https://github.com/rubygems/rubygems/commit/911cd29159
This commit is contained in:
parent
9f17a0c7cb
commit
af594f5166
@ -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…
x
Reference in New Issue
Block a user