Add datatype to param()

This commit is contained in:
Markus Fleschutz
2021-07-15 15:51:22 +02:00
parent 35255539df
commit b97098fc42
109 changed files with 256 additions and 216 deletions

View File

@ -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" }