Skip to content

Commit

Permalink
Invoke-SetupAction: Expand environment variables (#1914)
Browse files Browse the repository at this point in the history
- Update private command:
  - `Invoke-SetupAction` was changed to expand environment variables that
    is passed as the media path.
  • Loading branch information
johlju authored Apr 17, 2023
1 parent d8e6b74 commit 3e81805
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Gitversion no longer evaluates bumping major version using the word "major".
- Update private command:
- Update private commands:
- `Assert-SetupActionProperties` was changed to throw
an exception when a feature is not supported (calls `Assert-Feature`).
The private command is indirectly used by the setup action commands.
- `Invoke-SetupAction` was changed to expand environment variables that
is passed as the media path.
- SqlSetup
- Update to support checking non-supported features using the command
`SqlDscIsSupportedFeature` ([issue #1872](https://github.com/dsccommunity/SqlServerDsc/issues/1872)).
Expand Down
4 changes: 3 additions & 1 deletion source/Private/Invoke-SetupAction.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1672,8 +1672,10 @@ function Invoke-SetupAction

if ($PSCmdlet.ShouldProcess($verboseDescriptionMessage, $verboseWarningMessage, $captionMessage))
{
$expandedMediaPath = [System.Environment]::ExpandEnvironmentVariables($MediaPath)

$startProcessParameters = @{
FilePath = Join-Path -Path $MediaPath -ChildPath 'setup.exe'
FilePath = Join-Path -Path $expandedMediaPath -ChildPath 'setup.exe'
ArgumentList = $setupArgument
Timeout = $Timeout
}
Expand Down

0 comments on commit 3e81805

Please sign in to comment.