xcodes icon indicating copy to clipboard operation
xcodes copied to clipboard

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

Open jdillon opened this issue 1 month ago • 1 comments

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.

jdillon avatar Nov 14 '25 23:11 jdillon