Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Add flag --gem-gem to specify the path to the 'gem' tool

  Default is 'gem' and uses $PATH
  #85
  • Loading branch information...
commit 1833e94927bebdbfe149f32ffabf016447ae4600 1 parent c71a414
@jordansissel authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/fpm/source/gem.rb
View
10 lib/fpm/source/gem.rb
@@ -7,6 +7,8 @@
class FPM::Source::Gem < FPM::Source
def self.flags(opts, settings)
+ settings.source[:gem] = "gem"
+
opts.on("--bin-path DIRECTORY",
"The directory to install gem executables") do |path|
settings.source[:bin_path] = path
@@ -15,6 +17,12 @@ def self.flags(opts, settings)
"Prefix for gem packages") do |package_prefix|
settings.source[:package_prefix] = package_prefix
end
+
+ opts.on("--gem PATH_TO_GEM",
+ "The path to the 'gem' tool (defaults to 'gem' and searches " \
+ "your $PATH)") do |path|
+ settings.source[:gem] = path
+ end
end # def flags
def get_source(params)
@@ -131,7 +139,7 @@ def make_tarball!(tar_path, builddir)
end
::FileUtils.mkdir_p(installdir)
- args = ["gem", "install", "--quiet", "--no-ri", "--no-rdoc",
+ args = [self[:settings][:gem], "install", "--quiet", "--no-ri", "--no-rdoc",
"--install-dir", installdir, "--ignore-dependencies", "-E"]
if self[:settings][:bin_path]
tmp_bin_path = File.join(tmpdir, self[:settings][:bin_path])
Please sign in to comment.
Something went wrong with that request. Please try again.