mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-26 11:21:46 +00:00
bugfix: logic error: pull only if in git repository
This commit is contained in:
parent
0e50978a74
commit
4ab07fb4db
@ -40,15 +40,15 @@ function ReadyDotfilesRepo
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Clone new repo in destination dir if not exists
|
# Clone new repo in destination dir if not exists
|
||||||
if (-not (Test-Path $destination))
|
if ((Test-Path $destination) -and (IsGitRepository -dir $destination -url $url))
|
||||||
{
|
{
|
||||||
Write-Host "Cloning dotfiles repository..." -ForegroundColor Cyan
|
Write-Host "Pulling latest changes from dotfiles repository..." -ForegroundColor Cyan
|
||||||
git clone $url $destination
|
Write-Host "$(git -C $destination pull)"
|
||||||
return $destination
|
return $destination
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Pulling latest changes from dotfiles repository..." -ForegroundColor Cyan
|
Write-Host "Cloning dotfiles repository..." -ForegroundColor Cyan
|
||||||
Write-Host "$(git -C $destination pull)"
|
git clone $url $destination
|
||||||
return $destination
|
return $destination
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user