Skip to content
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

feat: Removed explicit 'latest' pwsh installation for Set-EnvironmentOnAgent script #3559

Merged
merged 5 commits into from
Oct 15, 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
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ Optional. The PowerShell modules that should be installed on the agent.
}
)

.PARAMETER InstallLatestPwshVersion
Optional. Enable to install the latest PowerShell version

.EXAMPLE
Set-EnvironmentOnAgent

Expand All @@ -133,7 +136,10 @@ function Set-EnvironmentOnAgent {
[CmdletBinding()]
param (
[Parameter(Mandatory = $false)]
[Hashtable[]] $PSModules = @()
[Hashtable[]] $PSModules = @(),

[Parameter(Mandatory = $false)]
[switch] $InstallLatestPwshVersion
)

############################
Expand Down Expand Up @@ -258,10 +264,12 @@ function Set-EnvironmentOnAgent {
}

Write-Verbose ('Install-CustomModule end') -Verbose
}

eriqua marked this conversation as resolved.
Show resolved Hide resolved
#####################################
## TEMP PowerShell installation ##
#####################################
if ($InstallLatestPwshVersion) {
Write-Verbose '=======================' -Verbose
Write-Verbose 'PowerShell installation' -Verbose
Write-Verbose '=======================' -Verbose

# Update the list of packages
sudo apt-get update
Expand Down