I have a couple of scripts I’d love to test via Travis on Windows. They work great locally but when tried in Travis hang. The command itself is
Install-Module PSWindowsUpdate and doesn’t work inside the script I wrote (Powershell) or when added to the
.travis.yml file. Below are two examples:
language: c os: windows install: - PowerShell -Command 'Set-ExecutionPolicy -ExecutionPolicy RemoteSigned' before_script: - PowerShell -Command 'Install-Module PSWindowsUpdate' script: - PowerShell -File src/setup-windows.ps1 - PowerShell -File src/update-windows.ps1 - PowerShell -File src/spring-clean.ps1
My Powershell Script:
# Update Windows # NOTE: Must be run in PowerShell, not command line (win + x -> Windows Powershell (Admin)) echo "Updating Windows..." Install-Module PSWindowsUpdate Get-WindowsUpdate Install-WindowsUpdate echo "Windows updated!"
Would love to know how I can fix this from hanging at this line. There is no output and Travis eventually times out without telling me what went wrong.