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:
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Exit on any error
|
||||
set -e
|
||||
# Exit if either side of a download pipeline fails
|
||||
set -euo pipefail
|
||||
|
||||
# Download and execute the patch script
|
||||
if ! curl -s https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s merlin_worker; then
|
||||
if ! curl -fsSL https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s -- merlin_worker; then
|
||||
echo "Error: Failed to download or execute patch script"
|
||||
exit 1
|
||||
fi
|
||||
@@ -12,7 +12,7 @@ fi
|
||||
# Check if ~/.bashrc exists and contains PYTHONPATH export
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
# Extract PYTHONPATH from ~/.bashrc (look for export PYTHONPATH=...)
|
||||
BASHRC_PYTHONPATH=$(grep -E "^export PYTHONPATH=" "$HOME/.bashrc" | tail -1)
|
||||
BASHRC_PYTHONPATH=$(grep -E "^export PYTHONPATH=" "$HOME/.bashrc" | tail -1 || true)
|
||||
|
||||
if [ -n "$BASHRC_PYTHONPATH" ]; then
|
||||
echo "Found PYTHONPATH in ~/.bashrc: $BASHRC_PYTHONPATH"
|
||||
@@ -46,5 +46,5 @@ if [ -f "$HOME/.bashrc" ]; then
|
||||
echo "No PYTHONPATH export found in ~/.bashrc"
|
||||
fi
|
||||
else
|
||||
echo "~/.bashrc not found"
|
||||
echo "$HOME/.bashrc not found"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user