Skip to content

Commit

Permalink
(GH-976) note log skips
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Sep 23, 2016
1 parent f48f2b2 commit a1c0534
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -49,8 +49,8 @@ param (
[Parameter(Mandatory=$true, Position=0)][double] $size,
[parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
# This interrupts download progress, so ensure there is no output.
#Write-Debug "Running 'Format-FileSize' with size: '$size'";

# Do not log function call, it interrupts the single line download progress output.

Foreach ($unit in @('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB')) {
If ($size -lt 1024) {
Expand Down
Expand Up @@ -45,16 +45,18 @@ param (
[parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)

# Do not log function call - can mess things up

if ($exitCode -eq $null -or $exitCode -eq '') {
Write-Debug '$exitCode was passed null'
return
}

try {
$host.SetShouldExit($exitCode);
$host.SetShouldExit($exitCode);
} catch {
Write-Warning "Unable to set host exit code"
}

$env:ChocolateyExitCode = $exitCode;
}

0 comments on commit a1c0534

Please sign in to comment.