Skip to content

[CI] Handle missing Xcode gracefully in provision script. Fixes #25934 - #25936

Merged
rolfbjarne merged 2 commits into
mainfrom
dev/rolf/fix-provision-xcode-no-xcode-installed
Jul 6, 2026
Merged

rolfbjarne merged 2 commits into
mainfrom
dev/rolf/fix-provision-xcode-no-xcode-installed

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

The ListXcodes() function in the provisioning script calls ls -lad /Applications/Xcode* which throws an unhandled ExitException when no Xcode is installed (exit code 1 from ls when the glob matches nothing). This causes the entire provisioning step to abort before any actual provisioning can happen.

Wrap the ls call in a try-catch so that a missing Xcode installation is reported as informational output instead of crashing. The actual provisioning step (Xcode(...).XcodeSelect()) still runs afterwards and installs the required Xcode.

Fixes #25934

πŸ€– Pull request created by Copilot

The ListXcodes() function in the provisioning script calls
'ls -lad /Applications/Xcode*' which throws an ExitException when
no Xcode is installed (exit code 1 from ls when the glob matches
nothing). This causes the entire provisioning step to abort with
an unhandled exception before any actual provisioning can happen.

Wrap the ls call in a try-catch so that a missing Xcode installation
is reported as informational output instead of crashing. The actual
provisioning step (Xcode().XcodeSelect) will still run afterwards and
install the required Xcode.

Fixes #25934

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 6, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the CI provisioning script to avoid aborting when /Applications/Xcode* matches nothing (i.e., the machine has no preinstalled Xcode), allowing provisioning to continue and install/select the required Xcode.

Changes:

  • Wrap ListXcodes()’s ls -lad /Applications/Xcode* call in a try/catch and print an informational message when no Xcodes are found.

Comment thread tools/devops/provision-shared.in.csx Resolved
Address review feedback: capture the exception and include its message
in the output to aid troubleshooting if ls fails for an unexpected reason.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne
rolfbjarne enabled auto-merge (squash) July 6, 2026 12:48
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

βœ… [PR Build #075f26b] Build passed (Detect API changes) βœ…

Pipeline on Agent
Hash: 075f26bc0a9f009047bfc96bff2f821990f89c86 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

βœ… API diff for current PR / commit

NET (empty diffs)

βœ… API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 075f26bc0a9f009047bfc96bff2f821990f89c86 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

βœ… [PR Build #a09ac94] Build passed (Build packages) βœ…

Pipeline on Agent
Hash: a09ac948202721193e0fabfef4a39df2b7b31f1b [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

βœ… [PR Build #a09ac94] Build passed (Build macOS tests) βœ…

Pipeline on Agent
Hash: a09ac948202721193e0fabfef4a39df2b7b31f1b [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

πŸš€ [CI Build #a09ac94] Test results πŸš€

Test results

βœ… All tests passed on VSTS: test results.

πŸŽ‰ All 199 tests passed πŸŽ‰

Tests counts

βœ… assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
βœ… cecil: All 1 tests passed. Html Report (VSDrops) Download
βœ… dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
βœ… dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
βœ… dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
βœ… dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
βœ… dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
βœ… framework: All 2 tests passed. Html Report (VSDrops) Download
βœ… fsharp: All 4 tests passed. Html Report (VSDrops) Download
βœ… generator: All 5 tests passed. Html Report (VSDrops) Download
βœ… interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
βœ… introspection: All 4 tests passed. Html Report (VSDrops) Download
βœ… linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
βœ… linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
βœ… linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
βœ… linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
βœ… monotouch (iOS): All 18 tests passed. Html Report (VSDrops) Download
βœ… monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
βœ… monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
βœ… monotouch (tvOS): All 18 tests passed. [attempt 2] Html Report (VSDrops) Download
βœ… msbuild: All 2 tests passed. Html Report (VSDrops) Download
βœ… sharpie: All 1 tests passed. Html Report (VSDrops) Download
βœ… windows: All 3 tests passed. Html Report (VSDrops) Download
βœ… xcframework: All 4 tests passed. Html Report (VSDrops) Download
βœ… xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

βœ… Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
βœ… Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
βœ… Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
βœ… Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
βœ… Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

βœ… Linux build succeeded

Pipeline on Agent
Hash: a09ac948202721193e0fabfef4a39df2b7b31f1b [PR build]

@rolfbjarne
rolfbjarne merged commit df1faca into main Jul 6, 2026
56 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/fix-provision-xcode-no-xcode-installed branch July 6, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Infrastructure: Provision Xcode fails on bot VSM-XAM-08.Tahoe.arm64 (no Xcode in /Applications)

4 participants