From 654dfdf8da7792aa04d85d31f258f67dfa07ce0f Mon Sep 17 00:00:00 2001 From: MaleNurse Date: Fri, 4 Feb 2022 12:38:33 -0800 Subject: [PATCH] Add full path to dependencies download PS's DownloadFile cmdlet was downloading to the desktop rather than the script directory, which broke the expand and remove actions when they couldn't find the file. Declared new var that concats script path and dependency name and then uses that for the remainder of actions. --- download_dependencies.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/download_dependencies.ps1 b/download_dependencies.ps1 index c953613b..0bbb1d02 100644 --- a/download_dependencies.ps1 +++ b/download_dependencies.ps1 @@ -1,8 +1,9 @@ function Download($URL, $NAME){ - (New-Object System.Net.WebClient).DownloadFile($URL, $NAME+".zip") - Expand-Archive -Path $NAME".zip" -Force - Remove-Item -Path $NAME".zip" -Force + $DEST=$PSScriptRoot+"\"+$NAME+".zip" + (New-Object System.Net.WebClient).DownloadFile($URL, $DEST) + Expand-Archive -Path $DEST -Force + Remove-Item -Path $DEST -Force }