Files
git-workshop/module-03-branching/reset.ps1
2026-01-04 16:43:21 +01:00

27 lines
757 B
PowerShell

#!/usr/bin/env pwsh
<#
.SYNOPSIS
Resets the Module 03 challenge environment.
.DESCRIPTION
This script removes the existing challenge directory and runs
the setup script again to create a fresh challenge environment.
#>
Write-Host "`n=== Resetting Module 03 Challenge ===" -ForegroundColor Cyan
# Remove existing challenge directory if it exists
if (Test-Path "challenge") {
Write-Host "Removing existing challenge directory..." -ForegroundColor Yellow
Remove-Item -Recurse -Force "challenge"
} else {
Write-Host "No existing challenge directory found." -ForegroundColor Cyan
}
Write-Host ""
Write-Host "----------------------------------------" -ForegroundColor Cyan
Write-Host ""
# Run setup script
& "$PSScriptRoot\setup.ps1"