mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-10 05:17:44 +02:00
Updated the manuals
This commit is contained in:
@ -15,6 +15,7 @@ Parameters
|
||||
Position? 1
|
||||
Default value "$PWD"
|
||||
Accept pipeline input? false
|
||||
Aliases
|
||||
Accept wildcard characters? false
|
||||
|
||||
[<CommonParameters>]
|
||||
@ -60,7 +61,7 @@ param([string]$RepoDir = "$PWD")
|
||||
try {
|
||||
Write-Progress "(1/3) Searching for Git executable... "
|
||||
$null = (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-Progress "(2/3) Checking local repository..."
|
||||
if (!(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder: $RepoDir" }
|
||||
@ -68,14 +69,14 @@ try {
|
||||
|
||||
Write-Progress "(3/3) Fetching latest updates..."
|
||||
& git -C "$RepoDir" fetch --all --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" }
|
||||
Write-Progress -completed "Done."
|
||||
|
||||
" "
|
||||
"Commit ID Reference"
|
||||
"--------- ---------"
|
||||
& git -C "$RepoDir" ls-remote origin 'pull/*/head'
|
||||
if ($lastExitCode -ne "0") { throw "'git ls-remote' failed with exit code $lastExitCode" }
|
||||
if ($lastExitCode -ne 0) { throw "'git ls-remote' failed with exit code $lastExitCode" }
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
@ -83,4 +84,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(page generated by convert-ps2md.ps1 as of 01/23/2025 12:15:22)*
|
||||
*(page generated by convert-ps2md.ps1 as of 05/12/2025 22:02:56)*
|
||||
|
Reference in New Issue
Block a user