From 2d6a6ba5d92edaa03960e335b7d624c4def01559 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Fri, 18 Sep 2020 16:45:09 +0200 Subject: [PATCH] Appveyor moved function into scriptblock --- appveyor.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index fb96b2a54..3a6f783b3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -65,13 +65,13 @@ clone_script: } } - Function WSLExec($Text, $Cmd) { - Write-Host "$Text" -NoNewLine - wsl -- bash -c $Cmd - Write-Host "[ OK ]" -ForegroundColor Green - } - $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { + Function WSLExec($Text, $Cmd) { + Write-Host "$Text" + wsl -- bash -c $Cmd + Write-Host "$Text[ OK ]" -ForegroundColor Green + } + $WSLInstallTime=[System.Environment]::TickCount WSLExec "WSL update..." "sudo apt-get update 1>/dev/null" WSLExec "WSL upgrade..." "sudo apt-get upgrade -y 1>/dev/null" @@ -81,8 +81,6 @@ clone_script: Add-AppveyorMessage -Message "WSL setup took $(([System.Environment]::TickCount-$WSLInstallTime) / 1000) sec" -Category Information } - Receive-Job -Job $WSLjob - Write-Host "Removing ProxSpace..." -NoNewLine $PSInstallTime=[System.Environment]::TickCount @@ -92,6 +90,8 @@ clone_script: Remove-Item -Recurse -Force -Path $env:proxspace_path Write-Host "[ OK ]" -ForegroundColor Green + + Receive-Job -Job $WSLjob Write-Host "Download ProxSpace..." -NoNewLine @@ -101,6 +101,8 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Green + Receive-Job -Job $WSLjob + Write-Host "Extracting ProxSpace..." -NoNewLine Expand-Archive -LiteralPath "$env:proxspace_zip_file" -DestinationPath "\" @@ -109,6 +111,8 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Green + Receive-Job -Job $WSLjob + Write-Host "Renaming ProxSpace folder..." -NoNewLine Get-ChildItem -Path "\$env:proxspace_zip_folder_name" | Rename-Item -NewName (Split-Path $env:proxspace_path -Leaf)