mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-15 11:10:54 +01:00
Update fetch-repo.ps1
This commit is contained in:
parent
d81531ee34
commit
d59040b128
@ -22,12 +22,12 @@ try {
|
|||||||
& git --version
|
& git --version
|
||||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||||
|
|
||||||
Write-Host "⏳ (2/3) Checking local folder ... 📂$RepoDir"
|
Write-Host "⏳ (2/3) Checking local folder... 📂$RepoDir"
|
||||||
if (!(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder: $RepoDir" }
|
if (!(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder: $RepoDir" }
|
||||||
$RepoDirName = (Get-Item "$RepoDir").Name
|
$RepoDirName = (Get-Item "$RepoDir").Name
|
||||||
|
|
||||||
Write-Host "⏳ (3/3) Fetching updates... " -noNewline
|
Write-Host "⏳ (3/3) Fetching updates..."
|
||||||
& git -C "$RepoDir" fetch --all --recurse-submodules --tags --prune --prune-tags --force
|
& git -C "$RepoDir" fetch --all --recurse-submodules --tags --prune --prune-tags --force --quiet
|
||||||
if ($lastExitCode -ne "0") { throw "'git fetch --all' failed with exit code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "'git fetch --all' failed with exit code $lastExitCode" }
|
||||||
|
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
|
Loading…
Reference in New Issue
Block a user