Skip to content

Commit 1963533

Browse files
committed
some fixes with yum packages
1 parent 5e3212b commit 1963533

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/travis/build/addons.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
require 'travis/build/addons/apt'
33
require 'travis/build/addons/apt_packages'
44
require 'travis/build/addons/apt_retries'
5+
require 'travis/build/addons/yum'
56
require 'travis/build/addons/snaps'
67
require 'travis/build/addons/artifacts'
78
require 'travis/build/addons/chrome'

lib/travis/build/addons/yum.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def before_configure
4141
retries=5
4242
timeout=30
4343
YUM_CONF
44-
sh.cmd %Q{su -m root -c "mv #{tmp_dest} ${TRAVIS_ROOT}/usr/local/etc/yum.conf"}
44+
sh.cmd %Q{sudo mv #{tmp_dest} ${TRAVIS_ROOT}/usr/local/etc/yum.conf}
4545
end
4646

4747
def config
@@ -52,7 +52,7 @@ def install_yum
5252
sh.echo "Installing #{config_yum.count} packages", ansi: :yellow
5353

5454
packages = config_yum.map{|v| Shellwords.escape(v)}.join(' ')
55-
sh.cmd "su -m root -c 'yum install -y #{packages}'", echo: true, timing: true, assert: true
55+
sh.cmd "sudo yum install -y #{packages}", echo: true, timing: true, assert: true
5656
end
5757

5858
def config_yum

0 commit comments

Comments
 (0)