whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: set sudo user and group inside sudo block
Date Tue, 26 Nov 2019 03:56:50 GMT
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 7201c0d  set sudo user and group inside sudo block
7201c0d is described below

commit 7201c0d988eae5bc528ceab5dca6a876513e794c
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Nov 25 22:56:25 2019 -0500

    set sudo user and group inside sudo block
---
 config/setupmymac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/setupmymac b/config/setupmymac
index 8bfdaae..997ac1e 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -87,9 +87,9 @@ end
 
 mac_version = `sw_vers`[/ProductVersion:\s+(.*)/, 1]
 unless Dir.exist? '/srv'
-  sudo_user = ENV['SUDO_USER']
-  sudo_group = Etc.getpwnam(sudo_user).gid
   sudo do
+    sudo_user = ENV['SUDO_USER']
+    sudo_group = Etc.getpwnam(sudo_user).gid
     if (mac_version.split('.').map(&:to_i) <=> [10, 15, 0]) >= 0
       # Catalina or later
       Dir.mkdir '/var/whimsy' unless Dir.exist? '/var/whimsy'


Mime
View raw message