Skip to content

Commit

Permalink
Merge pull request #24 from Dan1el42/issue-23
Browse files Browse the repository at this point in the history
Fixes #23. Added data type System.String to CheckSum parameter of Get/Set/Test-TargetResource functions and aligned indentation.
  • Loading branch information
KarolKaczmarek committed Aug 31, 2015
2 parents 5f6758e + f75d521 commit 254fa7b
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 254fa7b

Please sign in to comment.