Conversation
Replicates the macOS rust install from d4fc0d9 to the Ubuntu (apt) and Arch (pacman) platforms, since rust is required for building Ruby from source. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code review by Claude (Claude Code)
The PR does two things: (1) adds a 1. "rust is required for building Ruby from source" is inaccurate (all 3 platforms)Rust is not required to build Ruby. Ruby's 2. The rust install is redundant in the common path
3. Ubuntu's apt
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the fragile `return 0 2>/dev/null || exit 0` with a structured if/else so skipping auth never risks interrupting the sourced setup.sh. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Setup adds the user to new groups (e.g. docker) and writes shell config. Hand off `exec su - $USER` so those changes take effect immediately without re-ssh or re-login. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`su - $USER` prompts for the user's password. The only group change that needs to take effect immediately is docker, so re-exec into a shell with the docker group active via newgrp, which needs no password. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`$SHELL -l` re-reads the user's startup files (bash or zsh) so PATH/env changes from setup take effect. On Linux, wrap it in `sg docker` so the newly added docker group membership is active too. `sg` needs no password (the user is already a member), and is only used when the user is actually in the docker group, so it never blocks on a prompt. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Installs Claude Code via the native installer (claude.ai/install.sh) only when OPT_IN_CLAUDE_CODE=1. The opt-in gate lives in the lib/ scripts; doctor skips silently when not opted in. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude Code installs to ~/.local/bin, which isn't on PATH by default. Write the PATH addition to the rc file of the user's actual login shell (bash -> ~/.bashrc, zsh -> ~/.zshrc) with an OS-based fallback, so it works for bash on Ubuntu/Omarchy and zsh on macOS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Write PATH/env to the user's login shell rc (bash -> ~/.bashrc, zsh -> ~/.zshrc) with an OS fallback, never hardcode ~/.zshrc. Flags the existing mise/brew ~/.zshrc-only writes as a known bug. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mise_setup.sh and packages_setup.sh hardcoded ~/.zshrc for persisting `mise activate` / `brew shellenv`. setup.sh re-execs `$SHELL -l`, and on Ubuntu/Arch the default login shell is bash, so a bash user never sourced those lines -- mise (and the Ruby/Node toolchain it fronts) silently failed to activate in new shells. Centralize the login-shell-rc selection in a login_shell_rc() helper in common.sh (bash -> ~/.bashrc, zsh -> ~/.zshrc, with an $OS fallback) and use it from mise_setup.sh, packages_setup.sh, and claude_code_setup.sh (whose inline case block it replaces). Update AGENTS.md to point at the helper and drop the now-fixed "known bug" note. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Authenticating gh does not, by itself, teach git to use that token. A repo cloned with `gh repo clone` gets an HTTPS remote, so `git pull` prompts for a username/password unless git's credential helper points at `gh auth git-credential`. gh auth login normally configures this, but it is skipped when gh is authenticated non-interactively (token/GH_TOKEN). Run `gh auth setup-git` after authentication so git delegates GitHub HTTPS auth to gh, and add a doctor check that the helper is configured. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After auth, derive user.name/user.email from `gh api user` and set them globally, mirroring GitHub's own fallbacks: login when the display name is hidden, and the id+login noreply address when the email is private. Fill in only values that are not already configured so an identity the user set deliberately is never clobbered. Add a matching doctor check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Export it for the setup session (so every brew install below and the Homebrew install script inherit it) and persist it to the login shell rc so brew stays non-interactive outside setup too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
git, Homebrew, and native gem compilation all depend on the CLT, so install them before anything else. Runs before common.sh is sourced, so it detects macOS via uname and blocks until the tools are present. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The bootstrap installer's "Press RETURN to continue" prompt is silenced by NONINTERACTIVE=1, not HOMEBREW_NO_ASK (which only covers brew install/upgrade). Set it on the install invocation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
In NONINTERACTIVE mode the installer probes sudo with `sudo -n` and aborts with "Need sudo access" when no credentials are cached. Prime the sudo timestamp with a single `sudo -v` prompt and keep it alive for the install, so Homebrew installs unattended without running setup.sh as root. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
On macOS, op must authenticate via the desktop app's CLI integration, not manually-added or service accounts. Probe with `op signin -f` and loop until the integration is enabled AND the user clicks Authorize: - "No accounts configured" output => integration off; show enable steps and retry (piped `n` declines the manual account-add prompt so the user never enters the email/service-account flow). - non-zero exit => Authorize popup cancelled; retry. - exit 0 with no output => authorized. Reads retry prompts from /dev/tty so it works under curl | bash. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
It's installed up front in setup.sh now, so the macOS build-essentials branch no longer needs to handle it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The first time the yarn shim runs, corepack materializes the real binary and, by default, blocks on an interactive "about to download ... continue?" prompt written to stderr. The yarn version probe hid stderr with 2>/dev/null, so setup froze silently with no visible prompt. Export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 for the yarn section so corepack downloads without asking, and drop the yarn --version probe (command -v is enough to confirm availability and never triggers a download). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
op signin with no accounts drops into an interactive "add an account manually? [Y/n]" prompt that op reads from /dev/tty directly, bypassing stdin redirection — so piping `n` didn't work and setup hung on it. Gate on `op account list` instead (enumerates accounts, never prompts): empty => integration off, ask the user to enable it and retry. Only once an account exists call `op signin`, which triggers the GUI Authorize popup (exit 0 = Authorized, non-zero = Cancelled => retry). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Re-exec'ing a fresh login shell was fragile and clunky (and leaked mise session state into the new shell). Drop it entirely and instead print a red, emoji-flagged notice telling the user to close all terminals and open a new one so the setup changes take effect. On Linux, add a note to log out/reboot when the user was added to the docker group. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
No description provided.