diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2023-02-05 22:08:38 -0800 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-02-22 08:42:16 +0000 |
commit | 3f0f9a7942a90f4dd6069e6074ea6211fe5d0bc5 (patch) | |
tree | ee42e0b267119835e29bb6f11d69c7b2a9240811 | |
parent | d81be0609b382dac877137c2d388289aec7d3107 (diff) | |
download | ruby-3f0f9a7942a90f4dd6069e6074ea6211fe5d0bc5.tar.gz |
[rubygems/rubygems] Add gem exec description
https://github.com/rubygems/rubygems/commit/dac1609fd5
-rw-r--r-- | lib/rubygems/commands/exec_command.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/rubygems/commands/exec_command.rb b/lib/rubygems/commands/exec_command.rb index ac04efa578..53b32c6353 100644 --- a/lib/rubygems/commands/exec_command.rb +++ b/lib/rubygems/commands/exec_command.rb @@ -34,9 +34,19 @@ class Gem::Commands::ExecCommand < Gem::Command "--version '#{Gem::Requirement.default}'" end - # TODO(segiddins): add a proper description! def description # :nodoc: <<-EOF +The exec command handles installing (if necessary) and running an executable +from a gem, regardless of whether that gem is currently installed. + +The exec command can be thought of as a shortcut to running `gem install` and +then the executable from the installed gem. + +For example, `gem exec rails new .` will run `rails new .` in the current +directory, without having to manually run `gem install rails`. +Additionally, the exec command ensures the most recent version of the gem +is used (unless run with `--conservative`), and that the gem is not installed +to the same gem path as user-installed gems. EOF end |