
bundler.spec.support.sudo.rb Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bundler-packaging-plugin Show documentation
Show all versions of bundler-packaging-plugin Show documentation
A Maven Plugin for packaging the gems defined in a Gemfile into a jar using Bundler
The newest version!
module Spec
module Sudo
def self.present?
@which_sudo ||= (`which sudo`.chomp rescue '')
!@which_sudo.empty?
end
def self.test_sudo?
present? && ENV['BUNDLER_SUDO_TESTS']
end
def sudo(cmd)
raise "sudo not present" unless Sudo.present?
sys_exec("sudo #{cmd}")
end
def chown_system_gems_to_root
sudo "chown -R root #{system_gem_path}"
end
end
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy