This is an automated email from the ASF dual-hosted git repository.

rubys 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 9164968  fix typo
9164968 is described below

commit 9164968dc7d6a58958e5d3a2eaca50d6ae1b455d
Author: Sam Ruby <[email protected]>
AuthorDate: Tue Nov 26 19:33:17 2019 -0500

    fix typo
---
 config/setupmymac | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/config/setupmymac b/config/setupmymac
index bd788fa..bb73ac4 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -51,7 +51,7 @@ end
 # Switch to root
 def sudo
   if Process.uid != 0
-    run "sudo", RbConfig.ruby, COMMAND, *ARGS
+    system "sudo", RbConfig.ruby, COMMAND, *ARGS
     exit $?.exitstatus unless $?.success?
   else
     yield
@@ -117,7 +117,7 @@ unless Dir.exist? '/srv'
     if (mac_version.split('.').map(&:to_i) <=> [10, 15, 0]) >= 0
       # Catalina or later
       run 'mkdir', '/var/whimsy' unless Dir.exist? '/var/whimsy'
-      run 'chown', "#{sudo_user}:{sudo_group}", '/var/whimsy'
+      run 'chown', "#{sudo_user}:#{sudo_group}", '/var/whimsy'
       run 'touch', '/etc/synthetic.conf'
       SYNTHETIC = '/etc/synthetic.conf'
       unless File.read(SYNTHETIC).include? "/var/whimsy"
@@ -131,7 +131,7 @@ unless Dir.exist? '/srv'
     else
       # prior to Catalina
       run 'mkdir', '/srv'
-      run 'chown', "#{sudo_user}:{sudo_group}", '/srv'
+      run 'chown', "#{sudo_user}:#{sudo_group}", '/srv'
     end
   end
 end
@@ -157,7 +157,10 @@ directories = [
 
 directories.each do |dir|
   sudo {run 'mkdir', '-p', dir} unless Dir.exist? dir
-  sudo {run 'chown', '-R', "#{uid}:{gid}", dir} unless File.stat(dir).uid == 
uid
+
+  unless File.stat(dir).uid == uid
+    sudo {run 'chown', '-R', "#{uid}:#{gid}", dir}
+  end
 end
 
 ### Docker installation

Reply via email to