-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run Launch config on unsaved File is broken #3655
Run Launch config on unsaved File is broken #3655
Comments
@JustinGrote Looks like this may be fixed by PowerShell/PowerShellEditorServices#1609? |
It doesn't, this is a separate issue. |
Oh dang, ok! Thanks for the confirmation. |
Oh this looks like a breakage due to the buggy behavior in #3666. |
This is weird since I don't think the extant behavior in the stable channel is correct either, it produces the output:
|
@JustinGrote Sooo upon digging, the logic around this hasn't changed in two years... |
This is super broken in general. Might punt from the next stable release because it was already broken. |
@JustinGrote Can you verify that your scenario is just as broken in the stable channel too? |
@andschwa haven't verified but I do know that the new |
I have a stashed change that definitely makes your scenario work better with respect to running the untitled script as |
@JamesWTruher is ruminating on potential solutions for us 😄 |
Prerequisites
Summary
Currently when you invoke an unsaved script with this launch config:
Given a simple unsaved script that says:
The run occurs like this:
(Note the first args[0] isn't specified in the script)
And produces no output.
Instead it should be using either the call operator or the '.' operator (this should be a configurable preference to determine if variables remain in scope of the PSIC or not):
.{<scriptGoesHere>} <argsGoHere>
So for this example, running the script with the 'fun' arg should result in the command:
.{"This is a {0} test" -f $args[0]} fun
Which produces the intended result.
PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
See description
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: