mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-17 10:11:27 +01:00
Improved both scripts
This commit is contained in:
parent
2cd0fcea5a
commit
0070c2cb97
@ -9,7 +9,7 @@
|
||||
try {
|
||||
& git --version
|
||||
} catch {
|
||||
write-error "Can't execute 'git' - make sure Git is installed and available"
|
||||
write-error "ERROR: can't execute 'git' - make sure Git is installed and available"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -27,9 +27,10 @@ try {
|
||||
}
|
||||
write-output "Cloning from $URL..."
|
||||
& git clone --recurse-submodules $URL
|
||||
if ($lastExitCode -ne "0") { throw "'git clone $URL' failed" }
|
||||
}
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ param($Directory = "")
|
||||
try {
|
||||
& git --version
|
||||
} catch {
|
||||
write-error "Can't execute 'git' - make sure Git is installed and available"
|
||||
write-error "ERROR: can't execute 'git' - make sure Git is installed and available"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -32,6 +32,6 @@ try {
|
||||
}
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user