Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,13 @@ jobs:

- bash: |
set -ev
# Force relink python@3.xx in Homebrew to resolve the conflict with pre-installed python 3.xx on macOS-12 image
# See: https://github.com/Azure/azure-cli/issues/29054
python_version=3.12
brew unlink python@$python_version && brew link --overwrite python@$python_version
# Force relink python@3.xx in Homebrew to resolve the conflict with pre-installed python 3.xx on macOS
# See: https://github.com/actions/runner-images/issues/9966
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One year later, the problem remains unresolved. Update the link to the runner-image issue.

brew unlink python@3.12 && brew link --overwrite python@3.12
brew unlink python@3.13 && brew link --overwrite python@3.13
Copy link
Copy Markdown
Contributor Author

@bebound bebound Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python@3.13 is a dependency of azure-cli:
==> Installing dependencies for azure-cli: libgit2, sqlite, python@3.13, z3, llvm, rust and python@3.12

python@3.13.4 just released, and brew tries to update it. We need to manually overwrite it too.

Dependency chain cryptography -> rust -> z3 -> python@3.13

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a dollar sign in $3.12?

Copy link
Copy Markdown
Contributor Author

@bebound bebound Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo. Weird, the task still succeeds. This line's exit code is 1.

brew unlink python@$3.12 && brew link --overwrite python@$3.12
Error: No such keg: /usr/local/Cellar/python@.12

The && can suppress set -e:

set -e
false && false
echo "wat"

>>> wat

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In false && false, the first false will not cause set -e to fail, and the second false is not executed. true && false will cause set -e to fail.

See


# update homebrew to latest version in case the formula is not compatible with the current homebrew version
brew update

echo == Remove pre-installed azure-cli ==
brew uninstall azure-cli
Expand Down
Loading