From de83f9ac30692b05d3f86e04564d101b1eb396c6 Mon Sep 17 00:00:00 2001 From: "marvin.dietermann" Date: Fri, 10 Apr 2026 12:05:22 +0200 Subject: [PATCH] fix(install): improve starship installation and oh-my-zsh configuration - Use direct binary download for starship instead of install script for better reliability - Add CHSH=no and --unattended flags to oh-my-zsh installation to prevent interactive prompts - Add manual shell change logic with proper error handling - Clean up temporary files after starship installation --- lib/starship.sh | 5 ++++- lib/zsh.sh | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/starship.sh b/lib/starship.sh index 0ed8b9a..9d4a988 100644 --- a/lib/starship.sh +++ b/lib/starship.sh @@ -6,7 +6,10 @@ step "3/9 — Installing Starship" if $IS_ARCH; then $PKG_INSTALL starship else - curl -ksS https://starship.rs/install.sh | sh -s -- -y + curl -ksSLo /tmp/starship.tar.gz https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-musl.tar.gz + tar xzf /tmp/starship.tar.gz -C /tmp + sudo install -m 755 /tmp/starship /usr/local/bin/starship + rm -f /tmp/starship /tmp/starship.tar.gz fi info "Starship installed/updated" diff --git a/lib/zsh.sh b/lib/zsh.sh index 9881001..48bb2b7 100644 --- a/lib/zsh.sh +++ b/lib/zsh.sh @@ -4,13 +4,19 @@ step "2/9 — Setting up Zsh" if [[ ! -d "$HOME/.oh-my-zsh" ]]; then - RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" || - RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -kfsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + RUNZSH=no KEEP_ZSHRC=yes CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || + RUNZSH=no KEEP_ZSHRC=yes CHSH=no sh -c "$(curl -kfsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended info "Oh My Zsh installed" else info "Oh My Zsh already present" fi +# Set zsh as default shell if it isn't already +if [[ "$(basename "$SHELL")" != "zsh" ]]; then + sudo chsh -s "$(command -v zsh)" "$USER" 2>/dev/null || true + info "Default shell changed to zsh" +fi + ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}" for plugin in zsh-autosuggestions zsh-syntax-highlighting; do