Fix: Installers now auto-update (git pull) to prevent stale directory errors

This commit is contained in:
Gemini AI
2025-12-14 01:00:42 +04:00
Unverified
parent 4d999fdc5c
commit edfb8628c2
2 changed files with 12 additions and 2 deletions

View File

@@ -19,7 +19,10 @@ $repoUrl = "https://github.com/roman-ryzenadvanced/OpenQode-Public-Alpha.git"
$targetDir = "OpenQode"
if (Test-Path $targetDir) {
Write-Host "Directory '$targetDir' already exists. Entering directory..." -ForegroundColor Yellow
Write-Host "Directory '$targetDir' already exists. Updating..." -ForegroundColor Yellow
Push-Location $targetDir
git pull
Pop-Location
} else {
Write-Host "Cloning repository..." -ForegroundColor Yellow
git clone $repoUrl $targetDir

View File

@@ -22,7 +22,14 @@ TARGET_DIR="OpenQode"
REPO_URL="https://github.com/roman-ryzenadvanced/OpenQode-Public-Alpha.git"
if [ -d "$TARGET_DIR" ]; then
echo -e "\033[1;33mDirectory '$TARGET_DIR' already exists. Entering...\033[0m"
echo -e "\033[1;33mDirectory '$TARGET_DIR' already exists. Updating...\033[0m"
cd "$TARGET_DIR"
git pull
if [ $? -ne 0 ]; then
echo -e "\033[0;31mUpdate failed. Please delete the directory and try again.\033[0m"
exit 1
fi
cd ..
else
echo -e "\033[1;33mCloning repository...\033[0m"
git clone "$REPO_URL" "$TARGET_DIR"