-
Notifications
You must be signed in to change notification settings - Fork 92
Update phpswitch.sh #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Removed commas from "brew_array" between "8.2" and "8.3" versions. Added comment for Apache folder "apache_conf_path", if Apache is installed via Home Brew on Apple Silicon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a syntax error in the brew_array definition and adds helpful comments for Apache configuration paths on Apple Silicon Macs.
- Fixed bash array syntax by removing commas between array elements "8.2", "8.3", and "8.4"
- Added documentation comments for alternative Apache configuration path when using Homebrew on Apple Silicon
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| fi | ||
|
|
||
| apache_change=1 | ||
| # Default Apache httpd folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even better?:
apache_conf_path=""
apache_paths=(
"/opt/homebrew/etc/httpd/httpd.conf" # installed via Homebrew (new Apple Silicon)
"/usr/local/etc/httpd/httpd.conf" # installed via Homebrew (Intel) ?
"/etc/apache2/httpd.conf" # macOS default apache path
)
# Iterate over apache_paths to find first path that exists
for path in "${apache_paths[@]}"; do
apache_conf_path="$path"
if [[ -f "$path" ]]; then
break
fi
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
Removed commas from "brew_array" between "8.2" and "8.3" versions.
Added comment for Apache folder "apache_conf_path", if Apache is installed via Home Brew on Apple Silicon