Files
git-workshop/module-01-basics/reset.ps1
2026-01-04 15:26:12 +01:00

30 lines
872 B
PowerShell

#!/usr/bin/env pwsh
<#
.SYNOPSIS
Resets the Module 01 challenge environment.
.DESCRIPTION
Removes the existing challenge directory and runs setup.ps1 to create a fresh challenge.
This is useful if you want to start over from scratch.
#>
Write-Host "Resetting Module 01: Git Basics Challenge..." -ForegroundColor Cyan
Write-Host ""
# Remove existing challenge directory if it exists
if (Test-Path "challenge") {
Write-Host "Removing existing challenge directory..." -ForegroundColor Yellow
Remove-Item -Path "challenge" -Recurse -Force
Write-Host "[SUCCESS] Challenge directory removed" -ForegroundColor Green
} else {
Write-Host "[INFO] No existing challenge directory found" -ForegroundColor Gray
}
Write-Host ""
Write-Host "Running setup script..." -ForegroundColor Cyan
Write-Host ""
# Run the setup script
& "$PSScriptRoot/setup.ps1"