Merge pull request #430 from Jackbennett/native-ps

Adds support for PS 4.0 native hash command to remove a dependency
This commit is contained in:
Martin Kemp 2015-03-18 14:54:31 +00:00
commit 58a89e779b

View File

@ -54,6 +54,10 @@ function Flatten-Directory ($name) {
}
function Digest-MD5 ($path) {
if(Get-Command Get-FileHash -ErrorAction SilentlyContinue){
return (Get-FileHash -Algorithm MD5 -Path $path).Hash
}
return Invoke-Expression "md5sum $path"
}