Skip to content

Commit 9cdf02a

Browse files
committed
Update changelog and style corrections
1 parent 47f4e87 commit 9cdf02a

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
- Refactor Test-TargetResource to return $false in all DSC resource - Fixes
1313
[Issue #12](https://github.com/PlagueHO/FileContentDsc/issues/13).
1414
- Correct configuration names in Examples - fixes [Issue #15](https://github.com/PowerShell/FileContentDsc/issues/15).
15+
- Refactor Test/Set-TargetResource in ReplaceText to be able to add a key if it doesn't exist but should -Fixes
16+
[Issue#20](https://github.com/PlagueHO/FileContentDsc/issues/20).
1517

1618
## 1.0.0.0
1719

DSCResources/DSR_ReplaceText/DSR_ReplaceText.psm1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@ function Set-TargetResource
155155

156156
if ($null -eq $fileContent)
157157
{
158-
# configuration file does not exist
158+
# Configuration file does not exist
159159
$fileContent = $Text
160160
}
161161
elseif ( [regex]::Matches($fileContent, $Search).Count -eq 0 )
162162
{
163-
# configuration file exists but Text does not exist so lets add it
163+
# Configuration file exists but Text does not exist so lets add it
164164
$fileContent = Add-ConfigurationEntry -FileContent $fileContent -Text $Text
165165
}
166166
else
167167
{
168-
# configuration file exists but Text not in a desired state so lets update it
168+
# Configuration file exists but Text not in a desired state so lets update it
169169
$fileContent = $fileContent -Replace $Search, $Text
170170
}
171171

@@ -360,11 +360,11 @@ function Add-ConfigurationEntry
360360
param
361361
(
362362
[Parameter()]
363-
[string]
363+
[String]
364364
$FileContent,
365365

366366
[Parameter()]
367-
[string]
367+
[String]
368368
$Text
369369
)
370370

0 commit comments

Comments
 (0)