From 7394dd65adf7db892a12188c473cf88172b00d21 Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Sun, 21 Apr 2024 13:28:15 +0200 Subject: [PATCH 1/2] fix: Made the setupmymac script work also if the passenger_conf file did not exist. --- config/setupmymac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/setupmymac b/config/setupmymac index ef4ef35c2a..792707017c 100755 --- a/config/setupmymac +++ b/config/setupmymac @@ -371,7 +371,8 @@ if option != :user snippet += "PassengerUser #{user}\nPassengerGroup #{group}\n" end -if !File.exist?(passenger_conf) or File.read(passenger_conf) != snippet +# If the passenger_conf doesn't exist or it doesn't match our expected, update/create it. +if (not File.exist?(passenger_conf)) or (File.exist?(passenger_conf) and File.read(passenger_conf) != snippet) sudo do color "$ sudo edit #{passenger_conf}" File.write passenger_conf, snippet unless $dry_run @@ -398,7 +399,7 @@ elsif force[:bundler] ARGS.push '--no-bundle' end -### Installl gems +### Install gems unless $root if force[:gems] or not File.exist?("#{WHIMSY}/Gemfile.lock") From 9292378ba0bba94ae186c5c5a5f434b418384311 Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Sun, 21 Apr 2024 13:31:02 +0200 Subject: [PATCH 2/2] fix: Made the setupmymac script work also if the passenger_conf file did not exist. --- config/setupmymac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/setupmymac b/config/setupmymac index 792707017c..91ef38ee21 100755 --- a/config/setupmymac +++ b/config/setupmymac @@ -371,7 +371,7 @@ if option != :user snippet += "PassengerUser #{user}\nPassengerGroup #{group}\n" end -# If the passenger_conf doesn't exist or it doesn't match our expected, update/create it. +# If the passenger_conf doesn't exist or it doesn't match our expected, update or create it. if (not File.exist?(passenger_conf)) or (File.exist?(passenger_conf) and File.read(passenger_conf) != snippet) sudo do color "$ sudo edit #{passenger_conf}"