File tree Expand file tree Collapse file tree
DSCResources/DSR_ReplaceText Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments