Skip to content

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

@jdillon

Description

@jdillon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions