mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-26 03:11:45 +00:00
implement fallback strategy in case of local contents
This commit is contained in:
parent
1846230e91
commit
0c3bd50246
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user