You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2020/06/18 02:06:19 UTC
[whimsy] branch master updated: add library containing the Ruby
executable to the CGI path
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 2e917f3 add library containing the Ruby executable to the CGI path
2e917f3 is described below
commit 2e917f3ddd1109856c8c372d3e22a93433cc071f
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Jun 17 22:05:24 2020 -0400
add library containing the Ruby executable to the CGI path
---
config/setupmymac | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/config/setupmymac b/config/setupmymac
index 5ac8827..4fa34cd 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -506,13 +506,19 @@ if config != File.read(HTTPD_CONF)
end
wconf_source = "#{WHIMSY}/config/whimsy.conf"
+wconf_content = File.read(wconf_source)
+if wconf_content =~ /^\s*SetEnv PATH /i
+ wconf_content[/^\s*SetEnv PATH .*/] =
+ "SetEnv PATH #{File.dirname RbConfig.ruby}:${PATH}"
+end
wconf_target = '/private/etc/apache2/other/whimsy.conf'
if
not File.exist?(wconf_target) or
- File.read(wconf_target) != File.read(wconf_source)
+ File.read(wconf_target) != wconf_content
then
sudo do
- run 'cp', wconf_source, wconf_target
+ color "$ cp #{wconf_source} #{wconf_target}"
+ File.write wconf_target, wconf_content
end
restart_apache = true