From 091a6bd56b268ab8e6aa95358cafc23aab8b241d Mon Sep 17 00:00:00 2001 From: 747DB66FBC <133031823+747DB66FBC@users.noreply.github.com> Date: Fri, 24 Nov 2023 22:28:55 +0100 Subject: [PATCH] Update Request-FileDownload.psm1 (#140) Had to dig deeper... If the the path "$(Get-TempScriptFolder)\downloads" is not existent. An has to be created, the script will fail. Cause of the error was a non-captured output in this function at corrected line. --- src/lib/Request-FileDownload.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Request-FileDownload.psm1 b/src/lib/Request-FileDownload.psm1 index f67bcd58..e0a9fd0a 100644 --- a/src/lib/Request-FileDownload.psm1 +++ b/src/lib/Request-FileDownload.psm1 @@ -30,7 +30,7 @@ function Request-FileDownload { If (!(Test-Path $OutputFolder)) { Write-Status -Types "@" -Status "$OutputFolder doesn't exist, creating folder..." - New-Item -Path $OutputFolder -ItemType Directory -Force + $OutputFolder = New-Item -Path $OutputFolder -ItemType Directory -Force } $FileLocation = Join-Path -Path $OutputFolder -ChildPath $OutputFile