diff --git a/scripts/setup/machine-setup/lib/dev.sh b/scripts/setup/machine-setup/lib/dev.sh index 8333280a..d943290c 100644 --- a/scripts/setup/machine-setup/lib/dev.sh +++ b/scripts/setup/machine-setup/lib/dev.sh @@ -155,7 +155,19 @@ nvim_latest_version() { # # The old install is removed only after the download has succeeded, so a failed # fetch leaves the working copy alone. +# +# This had NO macOS branch at all until it was caught here: unconditionally fetched +# nvim-linux-.tar.gz regardless of $OS, which 404s on a Mac. Not a crash — the +# caller's `if nvim_install; then … else warn …` catches the failure and reports it as +# ERRORS+=("Neovim: install failed") rather than aborting the run — but Neovim never +# actually landed. brew has a real, current formula, so that's the macOS path instead of +# reaching for a macOS release asset the way lazygit's fix did. nvim_install() { + if [[ "${OS:-}" == "macos" ]]; then + brew install neovim + return + fi + local asset tarball dest asset="$(nvim_asset)" tarball="/tmp/nvim-linux-${asset}.tar.gz"