XcodesOrg / XcodesOrg/xcodes

xcodes runtimes install returns immediately with 'Finished' when run without TTY (SSH non-interactive)

Open
#455 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
4.8k
Forks
182
Avg merge
2d 12h
Merged PRs (30d)
1

Description

Description

When running xcodes runtimes install via SSH without a TTY (e.g., through Ansible or ssh user@host 'command'), the command returns immediately with "Finished" output and exit code 0, even though the runtime download has not started or completed.

Steps to Reproduce

  1. SSH into a macOS host without allocating a TTY:

    ssh user@host '/opt/homebrew/bin/xcodes runtimes install "iOS 18.1"'
    
  2. Observe that the command returns immediately with:

    Finished
    
  3. Verify that no runtime was actually installed:

    xcrun simctl list runtimes
    

    Shows no iOS 18.1 runtime.

Expected Behavior

The command should block and download the runtime, showing progress, even when run without a TTY. Or, if TTY is required, it should fail with a clear error message rather than silently claiming success.

Actual Behavior

  • Returns immediately (< 2 seconds)
  • Outputs "Finished"
  • Exit code: 0
  • No runtime is downloaded/installed

Workaround

Force TTY allocation when running via SSH:

ssh -tt user@host '/opt/homebrew/bin/xcodes runtimes install "iOS 18.1"'

Or in Ansible:

vars:
  ansible_ssh_common_args: "-o RequestTTY=force"

Environment

  • xcodes version: 1.6.2
  • macOS version: 26.1
  • Xcode version: Xcode 16.1
  • Installation method: Homebrew

Additional Context

This issue makes it difficult to automate runtime installation via configuration management tools like Ansible, which don't allocate TTYs by default. The command should either work without a TTY or fail clearly instead of silently succeeding without doing anything.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing xcodes runtimes install "iOS 18.1" over SSH without a TTY, then trace the runtimes install command path in the repository. Compare its behavior with forced TTY allocation and define done as either completing the download without a TTY or returning a clear nonzero error instead of Finished with exit code 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.