proxb / PoshRSJob

Provides an alternative to PSjobs with greater performance and less overhead to run commands in the background, freeing up the console and allowing throttling on the jobs.
MIT License
541 stars 87 forks source link

Use $null as second argument in argumentlist #189

Closed JacobStruiksma closed 2 years ago

JacobStruiksma commented 6 years ago

Do you want to request a feature or report a bug? Bug

What is the current behavior? If after the first argument an $null value is given with the argumentlist, an error will be shown.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Start-RSJob -ArgumentList 'x',$null -ScriptBlock {
    param(
        [string]$FirstInput,
        $DataInput
    )   
}

What is the expected behavior? Prevent the error from occuring

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts? PSVersion: 5.1.17134.165 OS: Windows 10

Please provide a code example showing the issue, if applicable: see previous steps