Fix: Installers now auto-update (git pull) to prevent stale directory errors
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user