Skip to content

Commit

Permalink
Fixes #23. Added data type System.String to CheckSum parameter of Get…
Browse files Browse the repository at this point in the history
…/Set/Test-TargetResource functions and aligned indentation.
  • Loading branch information
Dan1el42 committed Aug 30, 2015
1 parent 5f6758e commit f75d521
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ function Get-TargetResource
[parameter(Mandatory = $true)]
[Microsoft.Management.Infrastructure.CimInstance[]]
$FileDirectory,
[ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')]
$CheckSum = 'ModifiedDate'

[ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')]
[System.String]
$CheckSum = 'ModifiedDate'
)

if ( -not (Test-path $VhdPath))
Expand Down Expand Up @@ -80,8 +82,10 @@ function Set-TargetResource
[parameter(Mandatory = $true)]
[Microsoft.Management.Infrastructure.CimInstance[]]
$FileDirectory,
[ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')]
$CheckSum = 'ModifiedDate'

[ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')]
[System.String]
$CheckSum = 'ModifiedDate'
)

if (-not (Test-Path $VhdPath)) { throw "Specified destination path $VhdPath does not exist!"}
Expand Down Expand Up @@ -161,9 +165,10 @@ function Test-TargetResource
[parameter(Mandatory = $true)]
[Microsoft.Management.Infrastructure.CimInstance[]]
$FileDirectory,

[ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')]
$CheckSum = 'ModifiedDate'

[ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')]
[System.String]
$CheckSum = 'ModifiedDate'
)

# If the VHD path does not exist throw an error and stop.
Expand Down

0 comments on commit f75d521

Please sign in to comment.