Skip to content

Duplication of last command into terminal #4056

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

Closed
6 tasks done
martincrothers opened this issue Jun 28, 2022 · 4 comments
Closed
6 tasks done

Duplication of last command into terminal #4056

martincrothers opened this issue Jun 28, 2022 · 4 comments
Labels
Issue-Bug A bug to squash. Resolution-Duplicate Will close automatically.

Comments

@martincrothers
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

When executing PowerShell code in Visual Studio Code, the executed command(s) get re-inserted into the terminal on the next line after completion (pic for clarity).
image

Versions I was running:
Extension: 2022.6.1
VS Code: 1.68.1
PowerShell: 7.2.5
OS: Windows 10 (OS Build 19043.1766)

I rolled back the extension to 2022.5.1 and the issue went away. Before rolling back the extension I tried rolling back VSCode to the previous version (1.67.2), but that did not resolve the issue. Rolling back the extension worked on both versions of VSCode. I did not try rolling back PowerShell.

PowerShell Version

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.5
PSEdition                      Core
GitCommitId                    7.2.5
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

PS C:\> code --version
1.67.2
c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
x64

Extension Version

PS C:\> code --list-extensions --show-versions | Select-String powershell
ms-vscode.powershell@2022.5.1

Steps to Reproduce

With code in the editor window, press F5 or the run button; or select some code and press F8 or the run selection button.

The example I had in the screenshot was a .ps1 file that only contained:

$pwd

...to keep the screenshot simple.

Visuals

No response

Logs

No response

@martincrothers martincrothers added the Issue-Bug A bug to squash. label Jun 28, 2022
@ghost ghost added the Needs: Triage Maintainer attention needed! label Jun 28, 2022
@andyleejordan
Copy link
Member

Duplicate of #4041, you indicated that you followed this instruction:

I have searched all issues to ensure it has not already been reported.

I am curious what you searched such that it did not come up? Thanks!

@andyleejordan andyleejordan added Resolution-Duplicate Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Jun 28, 2022
@martincrothers
Copy link
Author

Apologies. I looked for permutations of "repeated" and "duplicated".

@andyleejordan
Copy link
Member

No worries! I'm going to edit that issue with those words so it comes up! We'll have a new release out soon with the fix. Thank you!

@ghost
Copy link

ghost commented Jun 30, 2022

This issue has been marked as duplicate and has not had any activity in a day. It has been closed for housekeeping purposes.

@ghost ghost closed this as completed Jun 30, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Resolution-Duplicate Will close automatically.
Projects
None yet
Development

No branches or pull requests

2 participants