Skip to content

Commit

Permalink
SQLAlias: Fix for issue 949 (dsccommunity#950)
Browse files Browse the repository at this point in the history
- Changes to SqlAlias
  - Fixed issue where exception was thrown if reg keys did not exist (issue dsccommunity#949).
  • Loading branch information
ykuijs authored and johlju committed Dec 21, 2017
1 parent cee9053 commit f8e885c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

- Changes to SqlAlias
- Fixed issue where exception was thrown if reg keys did not exist
([issue #949](https://github.com/PowerShell/SqlServerDsc/issues/949)).

## 10.0.0.0

- BREAKING CHANGE: Resource module has been renamed to SqlServerDsc
Expand Down
4 changes: 2 additions & 2 deletions DSCResources/MSFT_SqlAlias/MSFT_SqlAlias.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function Set-TargetResource
{
if (!(Test-Path -Path $registryPath))
{
New-Item -Path $registryPath | Out-Null
New-Item -Path $registryPath -Force | Out-Null
}

Set-ItemProperty -Path $registryPath -Name $Name -Value $itemValue | Out-Null
Expand All @@ -162,7 +162,7 @@ function Set-TargetResource
{
if (!(Test-Path -Path $registryPathWow6432Node))
{
New-Item -Path $registryPathWow6432Node | Out-Null
New-Item -Path $registryPathWow6432Node -Force | Out-Null
}

Set-ItemProperty -Path $registryPathWow6432Node -Name $Name -Value $itemValue | Out-Null
Expand Down

0 comments on commit f8e885c

Please sign in to comment.