Detect if using Git or not

This commit is contained in:
Steve Streeting 2020-05-29 12:19:22 +01:00
parent b1c80c1877
commit ca2da44266

View File

@ -110,13 +110,17 @@ try {
}
if (-not $nolfsprune) {
if ($dryrun) {
Write-Output "Would have pruned LFS files"
git lfs prune --dry-run
} else {
Write-Output "Pruning Git LFS files"
git lfs prune
$isGit = Test-Path .git
if ($isGit) {
if (-not $nolfsprune) {
if ($dryrun) {
Write-Output "Would have pruned LFS files"
git lfs prune --dry-run
} else {
Write-Output "Pruning Git LFS files"
git lfs prune
}
}
}
Write-Output "-- Cleanup finished OK --"