mirror of
https://github.com/cmderdev/cmder.git
synced 2025-02-10 23:49:07 +08:00
Adds support for PS 4.0 native hash command to remove a dependency
PS 4.0 requires installing WMF 4.0 on windows 7, 8, Server 2012 Native on 8.1, Server 2012r2
This commit is contained in:
parent
3c289b455b
commit
aad729eb87
@ -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