Skip to content

setup.zsh git clone and git pull have no timeout — a network stall hangs the entire setup with no recovery path #171

@ooloth

Description

@ooloth

Current state

features/setup/setup.zsh runs git clone and git pull with no timeout to fetch the dotfiles repository (~lines 94 and 99). If GitHub is slow or unreachable, these commands block indefinitely with no error output. Since the git operations happen early in setup, a network stall prevents the rest of the script from running — leaving a new machine with a partially configured environment and no indication of what went wrong.

Ideal state

  • Both git clone and git pull in setup.zsh are wrapped with a timeout (e.g. timeout 60 git clone ...) so a stalled connection fails within a bounded time.
  • GIT_TERMINAL_PROMPT=0 is set before the git calls to prevent git from prompting for credentials during a hung auth handshake.
  • When the timeout fires, the script prints a clear error message naming the specific operation that timed out.

Out of scope

  • Retry logic for git operations.
  • Timeouts for curl calls in other install scripts (each tracked separately).

Starting points

  • features/setup/setup.zshgit pull at line ~94, git clone at line ~99

QA plan

  1. Read features/setup/setup.zsh and confirm both git clone and git pull are prefixed with timeout N (or wrapped in a function that applies a timeout).
  2. Confirm GIT_TERMINAL_PROMPT=0 is exported before the git calls.
  3. Run timeout 1 git clone https://github.com/ooloth/dotfiles.git /tmp/test-clone with a 1 s limit — expect exit within ~1 s with a non-zero code and a legible error message.

Done when

Both git clone and git pull in setup.zsh are bounded by an explicit timeout so a network stall fails promptly with a clear error rather than hanging the entire setup process.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions