Skip to content

Commit

Permalink
Merge pull request #174 from codykonior/master
Browse files Browse the repository at this point in the history
Minor variable declaration
  • Loading branch information
proxb authored Feb 7, 2018
2 parents 2a519c1 + a29cc8d commit eb3112a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PoshRSJob/PoshRSJob.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ $PoshRS_jobCleanup.PowerShell = [PowerShell]::Create().AddScript({
If ($job.Handle.isCompleted -AND (-NOT $Job.Completed)) {
#$PoshRS_jobCleanup.Host.UI.WriteVerboseLine("$($Job.Id) completed")
$Data = $null
$CaughtErrors = $null
Try {
$Data = $job.InnerJob.EndInvoke($job.Handle)
} Catch {
Expand Down Expand Up @@ -156,7 +157,7 @@ $PoshRS_jobCleanup.PowerShell = [PowerShell]::Create().AddScript({
#$PoshRS_jobCleanup.Host.UI.WriteVerboseLine("$($Job.Id) Disposing job")
$job.InnerJob.dispose()
#Return type from Invoke() is a generic collection; need to verify the first index is not NULL
If (($Data.Count -gt 0) -AND (-NOT ($Data.Count -eq 1 -AND $Null -eq $Data[0]))) {
If ($Data -and ($Data.Count -gt 0) -AND (-NOT ($Data.Count -eq 1 -AND $Null -eq $Data[0]))) {
$job.output = $Data
$job.HasMoreData = $True
}
Expand Down

0 comments on commit eb3112a

Please sign in to comment.