-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix macOS build environment script #15354
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
base: main
Are you sure you want to change the base?
Conversation
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
Fix shell script compatibility issues by updating conditional syntax from single to double brackets to resolve bash parsing errors on macOS.
- Replace single bracket
[
with double bracket[[
in conditional statements - Ensure script compatibility with GNU bash version 5.3.0
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
if [ -n "${BUILDENV_ARM64_CROSS}" ]; then | ||
if [ -n "${BUILDENV_RELEASE}" ]; then |
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.
[nitpick] For consistency with the updated conditional checks, consider updating these remaining single bracket conditionals to use double brackets [[ ]]
syntax as well.
Copilot uses AI. Check for mistakes.
fi | ||
elif [ "$HOST_ARCH" == "arm64" ]; then | ||
elif [[ "$HOST_ARCH" == "arm64" ]]; then | ||
if [ -n "${BUILDENV_RELEASE}" ]; then |
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.
[nitpick] For consistency with the updated conditional checks, consider updating this remaining single bracket conditional to use double brackets [[ ]]
syntax as well.
if [ -n "${BUILDENV_RELEASE}" ]; then | |
if [[ -n "${BUILDENV_RELEASE}" ]]; then |
Copilot uses AI. Check for mistakes.
Thank you. The fix looks good. Can you rebase it to the 2.5 branch and change the merge target to 2.5 via the edit button above? |
Rebasing results in conflicts. Do we need a separate PR in this case? |
The code differs between 2.5 and 2.6. I recommend to rebase this to 2.6 |
Update conditional checks in the build environment script to use double brackets.
Single brackets errors with
I am using