You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/07/11 12:50:35 UTC
[whimsy] branch master updated: Ensure spawn does not use shell
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 380e39b Ensure spawn does not use shell
380e39b is described below
commit 380e39b02a6839a940a3cac0727a5c2a915f978e
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jul 11 13:50:26 2020 +0100
Ensure spawn does not use shell
---
Rakefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Rakefile b/Rakefile
index 6270c16..90dddd5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -192,13 +192,13 @@ namespace :svn do
r, w = IO.pipe
# Note: list the files to update to cater for later additions
# Also update '.' so parent directory shows last changed revision for status/svn page
+ svncmd = %w(svn update .)
+ # '.' is redundant if files not present, but it simplifies logic
if files
- svncmd = "svn update . #{files.join(' ')}"
- else
- svncmd = 'svn update'
+ svncmd += files
end
- puts "#{PREFIX} #{svncmd}"
- pid = Process.spawn(svncmd, out: w, err: [:child, :out])
+ puts "#{PREFIX} #{svncmd.join(' ')}"
+ pid = Process.spawn(*svncmd, out: w, err: [:child, :out])
w.close
pid, status = Process.wait2