implement fallback strategy in case of local contents

This commit is contained in:
Baipyrus 2024-11-28 15:08:23 +01:00
parent 1846230e91
commit 0c3bd50246

View File

@ -47,6 +47,14 @@ function ReadyDotfilesRepo
return $destination
}
# Try using current directory
$request = Read-Host "Clone the dotfiles repository anew? [y/N]"
if ($request.ToLower() -ne 'y')
{
Write-Warning "Fallback to current directory (Errors without necessary files)!"
return $cwd
}
Write-Host "Cloning dotfiles repository..." -ForegroundColor Cyan
git clone $url $destination
return $destination