cleanup: pathing issues

This commit is contained in:
Bjarke Sporring
2026-01-21 11:56:31 +01:00
parent cac03b69e3
commit 13dd2317f9

View File

@@ -30,7 +30,7 @@ if (-not (Test-Path $challengeRoot)) {
if (-not (Test-Path "$challengeRoot\.git")) { if (-not (Test-Path "$challengeRoot\.git")) {
Write-Error "Not a git repository." -ForegroundColor Red Write-Error "Not a git repository." -ForegroundColor Red
Write-Host "Run ..\setup.ps1 first to create the challenge environment." -ForegroundColor Yellow Write-Host "Run .\setup.ps1 first to create the challenge environment." -ForegroundColor Yellow
exit 1 exit 1
} }
@@ -57,13 +57,13 @@ if ($currentBranch -eq $mainBranch) {
# ============================================================================ # ============================================================================
# Check that merge is not in progress # Check that merge is not in progress
# ============================================================================ # ============================================================================
if (Test-Path "$challengeRoot/.git/MERGE_HEAD") { if (Test-Path "$challengeRoot\.git\MERGE_HEAD") {
Write-Fail "Merge is still in progress (conflicts not resolved)" Write-Fail "Merge is still in progress (conflicts not resolved)"
Write-Hint "Resolve conflicts in config.json, then: git add config.json && git commit" Write-Hint "Resolve conflicts in config.json, then: git add config.json && git commit"
exit 1 exit 1
} else { } else {
Write-Pass "No merge in progress (conflicts resolved)" Write-Pass "No merge in progress (conflicts resolved)"
}
# ============================================================================ # ============================================================================
# Check if config.json exists # Check if config.json exists
@@ -85,7 +85,6 @@ try {
Write-Fail "File 'config.json' is not valid JSON" Write-Fail "File 'config.json' is not valid JSON"
Write-Hint "Make sure you removed all conflict markers (<<<<<<<, =======, >>>>>>>)" Write-Hint "Make sure you removed all conflict markers (<<<<<<<, =======, >>>>>>>)"
Write-Hint "Check for missing commas or brackets" Write-Hint "Check for missing commas or brackets"
Pop-Location
exit 1 exit 1
} }
@@ -95,7 +94,6 @@ try {
if ($configContent -match '<<<<<<<|=======|>>>>>>>') { if ($configContent -match '<<<<<<<|=======|>>>>>>>') {
Write-Fail "Conflict markers still present in config.json" Write-Fail "Conflict markers still present in config.json"
Write-Hint "Remove all conflict markers (<<<<<<<, =======, >>>>>>>)" Write-Hint "Remove all conflict markers (<<<<<<<, =======, >>>>>>>)"
Pop-Location
exit 1 exit 1
} else { } else {
Write-Pass "No conflict markers in config.json" Write-Pass "No conflict markers in config.json"
@@ -158,7 +156,6 @@ if ($totalCommits -ge 5) {
Write-Hint "Make sure both branches are merged" Write-Hint "Make sure both branches are merged"
} }
Pop-Location
# ============================================================================ # ============================================================================
# Final summary # Final summary