bin/appbundle-updater in appbundle-updater-0.6.11 vs bin/appbundle-updater in appbundle-updater-0.6.15

- old
+ new

@@ -55,25 +55,28 @@ puts " running: #{cmd}" output = `#{cmd} 2>&1` # FIXME: bash/zsh-ism, will not work on csh unless $?.exited? && $?.exitstatus == 0 raise("Command [#{cmd}] failed!\n\n---BEGIN OUTPUT--\n#{output}\n---END OUTPUT--\n") end + ENV_KEYS.each { |key| ENV[key] = ENV.delete("_YOLO_#{key}") } end TAR_LONGLINK = "././@LongLink".freeze def install_package_dependencies banner("Installing Packages") - case `#{bin_dir}/ohai platform_family` + case `#{bin_dir}/ohai platform_family` # rubocop: disable Lint/LiteralAsCondition when /debian/ ENV["DEBIAN_FRONTEND"] = "noninteractive" run("apt-get -y update") run("apt-get -q -y install build-essential git liblzma-dev zlib1g-dev") when /fedora/, /rhel/, /amazon/ if File.exist?("/usr/bin/dnf") - run("dnf -y install gcc gcc-c++ make git zlib-devel lzma-devel") + run("dnf -y install gcc gcc-c++ make git zlib-devel") + # lzma-devel has been replaced in fedora 30+ with xz-devel + run("dnf -y install lzma-devel || dnf -y install xz-devel") else run("yum -y install gcc gcc-c++ make git zlib-devel lzma-devel") end when /suse/ run("zypper --non-interactive install gcc gcc-c++ make git") @@ -153,13 +156,13 @@ "chef/chef-vault", "test", "#{bin_dir.join("rake")} install" ), App.new( - "cookstyle", - "chef/cookstyle", - nil, + "cookstyle", + "chef/cookstyle", + nil, "#{bin_dir.join("rake")} install" ), App.new( "foodcritic", "foodcritic/foodcritic", @@ -168,11 +171,12 @@ ), App.new( "inspec", "chef/inspec", "test integration tools maintenance deploy", - "#{bin_dir.join("rake")} install"), + "#{bin_dir.join("rake")} install" + ), App.new( "ohai", "chef/ohai", "test", "#{bin_dir.join("rake")} install" @@ -180,11 +184,11 @@ App.new( "test-kitchen", "test-kitchen/test-kitchen", "guard test", "#{bin_dir.join("rake")} install" - ) + ), ].freeze class Updater attr_reader :app, :ref, :tarball, :repo @@ -288,10 +292,10 @@ end attr_reader :options, :parser def initialize - @options = Hash.new + @options = {} @parser = OptionParser.new do |opts| opts.banner = "Usage: #{$0} PROJECT APP_NAME GIT_REF" opts.on("-t", "--[no-]tarball", "Do a tarball download instead of git clone") do |t| options[:tarball] = t end