mirror of
https://github.com/cmderdev/cmder.git
synced 2025-01-26 16:19:08 +08:00
formatting code
This commit is contained in:
parent
28e42104ac
commit
a0827fb4f5
@ -38,7 +38,7 @@ function Extract-Archive($source, $target) {
|
|||||||
|
|
||||||
function Create-Archive($source, $target, $params) {
|
function Create-Archive($source, $target, $params) {
|
||||||
$command = "7z a -x@`"$source\packignore`" $params $target $source > `$null"
|
$command = "7z a -x@`"$source\packignore`" $params $target $source > `$null"
|
||||||
Write-Verbose "Creating Archive from '$source' to '$target' with parameters '$params'"
|
Write-Verbose "Creating Archive from '$source' in '$target' with parameters '$params'"
|
||||||
Invoke-Expression $command
|
Invoke-Expression $command
|
||||||
if ($lastexitcode -ne 0) {
|
if ($lastexitcode -ne 0) {
|
||||||
Write-Error "Compressing $source failed"
|
Write-Error "Compressing $source failed"
|
||||||
@ -58,7 +58,7 @@ function Flatten-Directory($name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Digest-Hash($path) {
|
function Digest-Hash($path) {
|
||||||
if(Get-Command Get-FileHash -ErrorAction SilentlyContinue){
|
if (Get-Command Get-FileHash -ErrorAction SilentlyContinue) {
|
||||||
return (Get-FileHash -Algorithm SHA256 -Path $path).Hash
|
return (Get-FileHash -Algorithm SHA256 -Path $path).Hash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user