Skip to content

Commit

Permalink
Merge pull request #40 from intergral/windows-dl-prog-bar
Browse files Browse the repository at this point in the history
Add option to disable download progress bar on Windows
  • Loading branch information
ibalal-intergral authored Feb 28, 2024
2 parents 65194e4 + 4d1b3aa commit cef6d5d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ You can use both `--install` and `--config.file` options in the same run command
or </br>
`sudo path/to/observability-agent-autoconf.sh --config.file path/to/config --install false`

For Windows, you can add `--disable-dl-progress-bar true` to potentially speed up downloads.

## Docker
When running in Docker, you will not be prompted for any information. Therefore, you must specify an api key before running. Additionally, you must set the relevant
environment variables for whichever services you have running, so they can be configured. These environment variables can be found in the [Environment Variables](#environment-variables) section.
Expand Down
12 changes: 12 additions & 0 deletions windows/observability-agent-autoconf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ while ($args) {
$args = $args[2..$args.Count]
break
}
"--disable-dl-progress-bar" {
if ($args[1] -eq "true")
{
$DisableDownloadProgressBar = $true
}
$args = $args[2..$args.Count]
break
}
default {
Write-Error "Invalid option: $($args[0])"
exit 1
Expand All @@ -52,6 +60,10 @@ if ($INSTALL -ne $false) {

# Download the file
Write-Output "Downloading agent installer"
if ($DisableDownloadProgressBar -eq $true)
{
$ProgressPreference = 'SilentlyContinue'
}
Invoke-WebRequest -Uri $url -OutFile $outputPath

# Extract the contents of the zip file
Expand Down

0 comments on commit cef6d5d

Please sign in to comment.