From 55cb97ca0d092138661034276f4fb82b474154bd Mon Sep 17 00:00:00 2001 From: poduck Date: Wed, 3 Dec 2025 16:05:04 -0500 Subject: [PATCH] fix(deploy): Check if backup directory has content before restoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 3b4858c..d27238f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -110,7 +110,7 @@ fi cd "$REMOTE_DIR" # Restore .envs secrets -if [ -d /tmp/.envs-backup ]; then +if [ -d /tmp/.envs-backup ] && [ "$(ls -A /tmp/.envs-backup 2>/dev/null)" ]; then echo ">>> Restoring .envs secrets..." mkdir -p "$REMOTE_DIR/smoothschedule/.envs" cp -r /tmp/.envs-backup/* "$REMOTE_DIR/smoothschedule/.envs/" @@ -118,7 +118,7 @@ if [ -d /tmp/.envs-backup ]; then fi # Restore .ssh keys -if [ -d /tmp/.ssh-backup ]; then +if [ -d /tmp/.ssh-backup ] && [ "$(ls -A /tmp/.ssh-backup 2>/dev/null)" ]; then echo ">>> Restoring .ssh keys..." mkdir -p "$REMOTE_DIR/smoothschedule/.ssh" cp -r /tmp/.ssh-backup/* "$REMOTE_DIR/smoothschedule/.ssh/"