mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-10 13:27:41 +02:00
Add datatype to param()
This commit is contained in:
@ -11,10 +11,11 @@
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($URL = "")
|
||||
if ($URL -eq "") { $URL = read-host "Enter directory URL to download" }
|
||||
param([string]$URL = "")
|
||||
|
||||
try {
|
||||
if ($URL -eq "") { $URL = read-host "Enter directory URL to download" }
|
||||
|
||||
& wget --version
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'wget' - make sure wget is installed and available" }
|
||||
|
||||
|
Reference in New Issue
Block a user