Skip to content

chore: add date information to windows startup logs #12905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions provisionersdk/scripts/bootstrap_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ while ($true) {
# executing shell to be named "sshd", otherwise it fails. See:
# https://github.com/microsoft/vscode-remote-release/issues/5699
$BINARY_URL="${ACCESS_URL}/bin/coder-windows-${ARCH}.exe"
Write-Output "Fetching coder agent from ${BINARY_URL}"
Write-Output "$(Get-Date) Fetching coder agent from ${BINARY_URL}"
Invoke-WebRequest -Uri "${BINARY_URL}" -OutFile $env:TEMP\sshd.exe
break
} catch {
Write-Output "error: unhandled exception fetching coder agent:"
Write-Output "$(Get-Date) error: unhandled exception fetching coder agent:"
Write-Output $_
Write-Output "trying again in 30 seconds..."
Write-Output "$(Get-Date) trying again in 30 seconds..."
Start-Sleep -Seconds 30
}
}

# Check if running in a Windows container
if (-not (Get-Command 'Set-MpPreference' -ErrorAction SilentlyContinue)) {
Write-Output "Set-MpPreference not available, skipping..."
Write-Output "$(Get-Date) Set-MpPreference not available, skipping..."
} else {
Set-MpPreference -DisableRealtimeMonitoring $true -ExclusionPath $env:TEMP\sshd.exe
}
Expand Down
Loading