Skip to content

Commit

Permalink
Only check sandbox if we should start one
Browse files Browse the repository at this point in the history
  • Loading branch information
reuteras committed Nov 17, 2023
1 parent dfc45e6 commit 34553a9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions downloadFiles.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
. .\resources\download\common.ps1

# Check if sandbox is running
if ( tasklist | findstr WindowsSandbox ) {
Write-DateLog "Sandbox can't be running during install or upgrade."
Exit
}

if ($args.Count -eq 0) {
Write-DateLog "No arguments given. Will download all files."
Expand All @@ -15,6 +11,13 @@ if ($args.Count -eq 0) {
$all = $false
}

if ($all -or $args -contains "--bash" -or $args -contains "--node" -or $args -contains "--python") {
if ( tasklist | findstr WindowsSandbox ) {
Write-DateLog "Sandbox can't be running during install or upgrade."
Exit
}
}

# Remove old files
if ($all) {
Remove-Item -r $TOOLS > $null 2>$1
Expand Down

0 comments on commit 34553a9

Please sign in to comment.