From 84a64c36eea6a5940f4b1468dde3f4a7aa4b00ac Mon Sep 17 00:00:00 2001 From: WorlDXXXXX Date: Mon, 5 Jan 2026 11:22:42 +0100 Subject: [PATCH 1/2] update readme for permissions problem and try fix for downloads --- README.md | 10 +++++++++- bootstrap/lib/common.sh | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 60aed84..85ad7f5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Reproducible, idempotent bootstrap for Ubuntu 24.04 that installs a full develop Replace `` with your GitHub repo URL: ```bash -git clone ~/.dotfiles && ~/.dotfiles/bootstrap/install.sh +git clone ~/.dotfiles && bash ~/.dotfiles/bootstrap/install.sh ``` ## WSL2 systemd requirement (mandatory for Podman rootless) @@ -79,6 +79,14 @@ INSTALL_VSCODE_LINUX=1 ./bootstrap/install.sh ```bash ./bootstrap/steps/90-doctor.sh ``` +If the installer is not executable, either run: +```bash +chmod +x ./bootstrap/install.sh +``` +or execute it explicitly: +```bash +bash ./bootstrap/install.sh +``` ## Notes & assumptions diff --git a/bootstrap/lib/common.sh b/bootstrap/lib/common.sh index 73a426e..e5ea512 100644 --- a/bootstrap/lib/common.sh +++ b/bootstrap/lib/common.sh @@ -45,7 +45,7 @@ download_to_tmp() { local url tmp url="$1" tmp="$(mktemp)" - log "Downloading ${url}" + log "Downloading ${url}" >&2 curl -fsSL "${url}" -o "${tmp}" printf '%s' "${tmp}" } From 9395786b3a38ead9af601f33f02b31966b364512 Mon Sep 17 00:00:00 2001 From: WorlDXXXXX Date: Mon, 5 Jan 2026 11:29:02 +0100 Subject: [PATCH 2/2] Improves bootstrap process reliability --- README.md | 16 ++++------------ bootstrap/steps/30-mise.sh | 8 ++++++++ bootstrap/steps/60-dotfiles.sh | 5 ++++- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 85ad7f5..7bbbea7 100644 --- a/README.md +++ b/README.md @@ -79,22 +79,14 @@ INSTALL_VSCODE_LINUX=1 ./bootstrap/install.sh ```bash ./bootstrap/steps/90-doctor.sh ``` -If the installer is not executable, either run: + If the installer is not executable, either run: + ```bash chmod +x ./bootstrap/install.sh ``` + or execute it explicitly: + ```bash bash ./bootstrap/install.sh ``` - -## Notes & assumptions - -- Ubuntu 24.04 only. Other distros/versions are rejected by preflight. -- WSL best practice: keep repos inside the Linux filesystem (e.g. `~/src`), not `/mnt/c`. -- Dotfiles are managed by chezmoi; re-running the installer reapplies the repo state. -- After opening a new shell, run `p10k configure` to personalize the Powerlevel10k prompt. -- Neovim and lazygit use GitHub “latest release” assets resolved at install time. -- `zsh-syntax-highlighting` must remain last in the plugins list; this repo enforces that ordering. -- The mise installer URL is assumed to be `https://mise.run` (official). Update it if upstream changes. -- For deterministic toolchains, pin exact versions in `mise/mise.toml`. A `mise.lock` can be generated and committed using mise tooling when needed. diff --git a/bootstrap/steps/30-mise.sh b/bootstrap/steps/30-mise.sh index 7d3bc3e..81b1cba 100644 --- a/bootstrap/steps/30-mise.sh +++ b/bootstrap/steps/30-mise.sh @@ -26,5 +26,13 @@ config_src="${BOOTSTRAP_ROOT}/mise/mise.toml" config_dest="${HOME}/.config/mise/config.toml" link_file "${config_src}" "${config_dest}" +if mise trust --help 2>/dev/null | grep -q -- '--yes'; then + mise trust --yes "${config_dest}" +elif mise trust --help 2>/dev/null | grep -q -- '-y'; then + mise trust -y "${config_dest}" +else + yes | mise trust "${config_dest}" +fi + log "Installing mise toolchains" MISE_CONFIG_FILE="${config_src}" mise install diff --git a/bootstrap/steps/60-dotfiles.sh b/bootstrap/steps/60-dotfiles.sh index 18291c0..bf0c10f 100644 --- a/bootstrap/steps/60-dotfiles.sh +++ b/bootstrap/steps/60-dotfiles.sh @@ -10,7 +10,10 @@ if ! have_cmd chezmoi; then install_url="https://get.chezmoi.io" tmpfile="$(download_to_tmp "${install_url}")" mkdir -p "${HOME}/.local/bin" - bash "${tmpfile}" -- -b "${HOME}/.local/bin" + if ! sh "${tmpfile}" -- -b "${HOME}/.local/bin"; then + warn "chezmoi installer failed with -- -b, retrying with -b" + sh "${tmpfile}" -b "${HOME}/.local/bin" + fi rm -f "${tmpfile}" fi