mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-12 06:02:56 +02:00
Cleanup
This commit is contained in:
@ -7,15 +7,15 @@
|
||||
# License: CC0
|
||||
|
||||
param([string]$File)
|
||||
if ($File -eq "" ) {
|
||||
$File = read-host "Enter file"
|
||||
}
|
||||
|
||||
try {
|
||||
if ($File -eq "" ) {
|
||||
$File = read-host "Enter file"
|
||||
}
|
||||
|
||||
$Result = get-filehash $File -algorithm SHA1
|
||||
write-host "✔️ SHA1 hash is" $Result.Hash
|
||||
write-output "SHA1 hash is" $Result.Hash
|
||||
exit 0
|
||||
} catch {
|
||||
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user