casey / just

🤖 Just a command runner
https://just.systems
Creative Commons Zero v1.0 Universal
20.66k stars 454 forks source link

PowerShell Core #1554

Open runeimp opened 1 year ago

runeimp commented 1 year ago

On macOS Big Sur 11.7.3 with the recipe

test:
    echo ': test'

If I have set shell := ["pwsh", "-c"] # PowerShell 7.3.2 Core (Multi-Platform) I get

echo ': test'
: test

cmdlet Write-Output at command pipeline position 1
Supply values for the following parameters:
InputObject: 

If I hit Ctrl+C then InputObject: ends up InputObject: error: Recipe `test` failed on line 14 with exit code 1

echo ': test'
: test

cmdlet Write-Output at command pipeline position 1
Supply values for the following parameters:
InputObject: error: Recipe `test` failed on line 14 with exit code 1

I've had PowerShell Core installed for about a year now and never experienced this issue before.

If I use set positional-arguments I get

echo ': test'
: test
test

Which is adding the name of the recipe test as an additional argument on each line which I believe hides the InputObject error. As this doesn't happen when using the default shell I'm inclined to believe this is a change in PowerShell which I believe updated recently. But not 100% sure and wanted to point out the problem.

runeimp commented 1 year ago

I've not tested this on Windows yet and wondering if any windows users are experiencing this with Just 1.13.0 using PowerShell Desktop and PowerShell Core.