This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new aad37a6 Don't use system shell
aad37a6 is described below
commit aad37a66ce4df4acc28266432c7d04ea2eeafc51
Author: Sebb <[email protected]>
AuthorDate: Fri Jul 3 12:26:18 2020 +0100
Don't use system shell
---
tools/pubsub.rb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/pubsub.rb b/tools/pubsub.rb
index 1bda926..2bb7c24 100644
--- a/tools/pubsub.rb
+++ b/tools/pubsub.rb
@@ -110,7 +110,7 @@ end
# Perform initial clone
if not Dir.exist? options.local
FileUtils.mkdir_p File.basename(options.local)
- system "git clone #{options.remote} #{options.local}"
+ system('git', 'clone', options.remote, options.local)
end
#
@@ -183,18 +183,18 @@ begin
# running; in which case it may not have picked up this update. So try
# again in 30, 60, 90, and 120 seconds, for a total of five minutes.
4.times do |i|
- break if system 'puppet agent -t'
+ break if system('puppet', 'agent', '-t')
sleep 30 * (i+1)
end
else
# update git directories in the foreground
Dir.chdir(options.local) do
before = `git log --oneline -1`
- system 'git fetch origin'
- system 'git clean -df'
- system 'git reset --hard origin/master'
+ system('git', 'fetch', 'origin')
+ system('git', 'clean', '-df')
+ system('git', 'reset', '--hard', 'origin/master')
if File.exist? 'Rakefile' and `git log --oneline -1` != before
- system 'rake update'
+ system('rake', 'update')
end
end
end