Skip to content

Commit 58a89e7

Browse files
committed
Merge pull request #430 from Jackbennett/native-ps
Adds support for PS 4.0 native hash command to remove a dependency
2 parents 3c289b4 + aad729e commit 58a89e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: scripts/utils.ps1

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ function Flatten-Directory ($name) {
5454
}
5555

5656
function Digest-MD5 ($path) {
57+
if(Get-Command Get-FileHash -ErrorAction SilentlyContinue){
58+
return (Get-FileHash -Algorithm MD5 -Path $path).Hash
59+
}
60+
5761
return Invoke-Expression "md5sum $path"
5862
}
5963

0 commit comments

Comments
 (0)