Repository navigation
Homebrew cask launcher asks for AZ_PYTHON when the Homebrew prefix is a symlink #34199
Copy link
Copy link
Closed
Closed
Copy link
Labels
Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teambugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Milestone
Description
Activity
- addedcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI team
on Oct 9, 2026 Thank you for opening this issue, we will look into it.
- addedX Engineering Agent ReviewedPull request reviewed by X Engineering AgentPull request reviewed by X Engineering AgentRequest X Engineering AgentRequest X Engineering Agent testing and reviewRequest X Engineering Agent testing and reviewand removedX Engineering Agent ReviewedPull request reviewed by X Engineering AgentPull request reviewed by X Engineering Agent
on Oct 9, 2026 x-engineering-agent commented
on Oct 9, 2026 ContributorMore actionsTriage
Duplicate of #34187. Both reports describe Azure CLI 2.91.0 Homebrew cask startup failing with
Error: AZ_PYTHON not set.when the Homebrew prefix resolves through a symlink. The affected launcher, reproduction steps, and expected Homebrew Python behavior match.The launcher template recognizes Homebrew through three hard-coded Caskroom prefixes and otherwise takes the tarball path. A resolved, relocated prefix can miss those checks.
Please track the fix in #34187 and the existing, still-open PR #34196. No separate implementation job is being queued for this duplicate.
Posted by x-engineering-agent (Fixer)
- removedRequest X Engineering AgentRequest X Engineering Agent testing and reviewRequest X Engineering Agent testing and review
on Oct 9, 2026 - addedbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
on Oct 9, 2026 It is a duplicate of #34187
Metadata
Metadata
Assignees
Labels
Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teambugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Describe the bug
With the new Homebrew cask (
brew install --cask azure-cli, 2.91.0),azfails on a Mac where the Homebrew prefix is a symlink (here/opt/homebrew -> /private/.bulk/opt/homebrew, which itself resolves to another volume):Cause:
scripts/release/standalone/templates/az_launcher.sh.inresolves its own path withcd -P(physical), then compares the result against literal prefixes:bash -xshows the resolved path is/Volumes/Data/.bulk/opt/homebrew/Caskroom/azure-cli/2.91.0/bin/../libexec/bin/az, soINSTALLER=TARBALLand the launcher demandsAZ_PYTHON, even though it is a cask install andpython@3.14is installed. The same happens with any custom Homebrew prefix.To reproduce
brew install --cask azure-cliaz versionExpected behavior
The cask install is detected and uses Homebrew's
python@3.14, with noAZ_PYTHONneeded.Suggestions
*/Caskroom/azure-cli/*. Or compare against the physical path of$HOMEBREW_PREFIX, orbrew --prefix.opt/python@3.14/libexec/bin/python3, doesn't exist in Homebrew'spython@3.14(itslibexec/binhaspython, notpython3). Detection only works because of thebin/python3.14fallback.Workaround
export AZ_PYTHON="$HOMEBREW_PREFIX/opt/python@3.14/bin/python3.14"Environment
/opt/homebrew, a symlink to/private/.bulk/opt/homebrew