mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 17:59:11 +08:00
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:
commit
58a89e779b
@ -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"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user