Skip to content

Commit eb3e0c0

Browse files
committed
Fix safe.directory for package checkouts, remove log file before tee
1 parent a30a0ef commit eb3e0c0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

update.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -euo pipefail
66

77
# Redirect all output to the log file (and console via tee)
88
LOG_FILE="/tmp/chatserver-update.log"
9+
rm -f "$LOG_FILE"
910
exec > >(tee "$LOG_FILE") 2>&1
1011

1112
# Configuration
@@ -26,6 +27,7 @@ fail() { printf '\033[1;31m✗ %s\033[0m\n' "$*" >&2; exit 1; }
2627
log "Fetching latest code"
2728
cd "$INSTALL_DIR"
2829
git config --global --add safe.directory "$INSTALL_DIR"
30+
git config --global --add safe.directory '*'
2931
git fetch origin
3032
git merge --ff-only origin/main
3133
ok "Repository updated"

0 commit comments

Comments
 (0)