Skip to content

Missing '$' in try-catch snippet #3964

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
5 of 6 tasks
jmilliron808 opened this issue May 10, 2022 · 3 comments · Fixed by #4311
Closed
5 of 6 tasks

Missing '$' in try-catch snippet #3964

jmilliron808 opened this issue May 10, 2022 · 3 comments · Fixed by #4311
Assignees
Labels

Comments

@jmilliron808
Copy link

jmilliron808 commented May 10, 2022

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

The try-catch snippet is missing it's '$' for the first tab stop.

Line 609 in /snippets/PowerShell.json should be:
"\t${1:<#Do this if a terminating exception happens#>}",
Instead of:
"\t{1:<#Do this if a terminating exception happens#>}",

PowerShell Version

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.2
PSEdition                      Core
GitCommitId                    7.2.2
OS                             Microsoft Windows 10.0.19044
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> code --version
1.67.0
57fd6d0195bb9b9d1b49f6da5db789060795de47
x64

Extension Version

PS> code --list-extensions --show-versions | Select-String powershell

[email protected]

Steps to Reproduce

Type 'try-catch' > hit tab > the cursor moves to $0 cursor position

It should move to $1 tab stop but it's missing the '$'

Visuals

No response

Logs

No response

@jmilliron808 jmilliron808 added the Issue-Bug A bug to squash. label May 10, 2022
@ghost ghost added the Needs: Triage Maintainer attention needed! label May 10, 2022
@JustinGrote
Copy link
Collaborator

Good catch!

@JustinGrote JustinGrote removed the Needs: Triage Maintainer attention needed! label May 10, 2022
@JustinGrote JustinGrote self-assigned this May 10, 2022
@andyleejordan
Copy link
Member

@JustinGrote I can't remember, was this fixed?

@JustinGrote
Copy link
Collaborator

Probably not, I'll keep it on my free time to do list.

@andyleejordan andyleejordan changed the title snippets/PowerShell.json missing '$' under try-catch Missing '$' in try-catch snippet Dec 7, 2022
@andyleejordan andyleejordan self-assigned this Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants