fix(install): make setup failures explicit and atomic
Installer pipelines masked dependency and download failures, causing false success messages and unsafe config replacement. Atomic updates and current upstream installers keep failures visible.
This commit is contained in:
+3
-6
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Save the original working directory
|
||||
ORIGINAL_DIR="$(pwd)"
|
||||
set -euo pipefail
|
||||
|
||||
# Install pyenv (Python Version Manager) if it is not already installed
|
||||
if command -v pyenv &> /dev/null; then
|
||||
@@ -15,6 +14,7 @@ else
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init - bash)"
|
||||
command -v pyenv &> /dev/null
|
||||
fi
|
||||
|
||||
# OPTIONAL: Install the latest stable version of Python
|
||||
@@ -22,7 +22,4 @@ fi
|
||||
# pyenv install 3.12.0 && pyenv global 3.12.0
|
||||
|
||||
# Apply the pyenv zsh configuration patch (downloads zshrc/pyenv.zsh to ~/.config/zshrc/pyenv.zsh)
|
||||
curl -s https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s pyenv
|
||||
|
||||
# Restore original working directory
|
||||
cd "$ORIGINAL_DIR"
|
||||
curl -fsSL https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s -- pyenv
|
||||
|
||||
Reference in New Issue
Block a user