Created
March 7, 2012 05:32
-
-
Save wisq/1991275 to your computer and use it in GitHub Desktop.
knife 0.9.18 wrapper with suppressed warnings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Optional: Force a particular Ruby version & gemset. | |
if ENV['BUNDLE_GEMFILE'].nil? | |
ENV['RBENV_VERSION'] = '1.9.3' | |
ENV['BUNDLE_GEMFILE'] = "#{ENV['HOME']}/ops/kitchen/Gemfile" | |
exec('bundle', 'exec', $0, *ARGV) | |
end | |
# Suppress iconv deprecation warning. | |
begin | |
verbosity = $VERBOSE | |
$VERBOSE = nil | |
require 'iconv' | |
ensure | |
$VERBOSE = verbosity | |
end | |
# Suppress Config -> RbConfig deprecation warning. | |
require 'rbconfig' | |
class Object | |
Config = RbConfig | |
end | |
# Load real knife. | |
load "#{Gem.bindir}/knife" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment