Open sba923 opened 5 years ago
Thanks @sba923 for reporting this, I can reproduce it in both extensions.
I think we've discussed this before with @rkeithhill and @TylerLeonhardt. It seems like it would be easy to convert the default over, but there may be a reason why we don't.
The basic difference is that with args we call PowerShell.AddScript()
but without args, we call PowerShell.AddCommand()
. The later is safer to use when a path can contain wildcard chars. We can look into how that command is inserted into the command history.
Issue Description
Take a script whose absolute path is:
If I hit F5 to run/debug it (using the
PowerShell Launch Current File
debug configuration), then go to the TERMINAL's prompt, and hitUp Arrow
I get:so if I then hit
Enter
I (obviously) get:Strangely enough, if I use the
PowerShell Launch Current File w/Args Prompt
debug configuration, I get the expected behavior, i.e. hittingUp Arrow
yields:which then works when hitting
Enter
-- the script does get re-executed, with the correct arguments at that.Expected Behaviour
I would expect to get the following after hitting
Up Arrow
:so that hitting
Enter
properly re-executes the script.Actual Behaviour
The script can't be re-executed using
Up Arrow
Enter
System Details
System Details Output
Attached Logs
PSESlogs-201904121429.zip