Skip to content

Add spaces between parameters when starting PSES #1554

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

Merged
merged 1 commit into from
Oct 1, 2018

Conversation

rkeithhill
Copy link
Contributor

@rkeithhill rkeithhill commented Oct 1, 2018

PR Summary

The current code works because the previous arg is quoted. For example, the
following is legal (which is something I didn't realize until today):
Foo -Version '1.2.3.4'-NextParameter
But this is not good form, so adding spaces between params.

Please merge to the 2.0.0 branch.

The resulting args look like this in the Output window:

9/30/2018 8:11:12 PM [NORMAL] - Language server starting --
9/30/2018 8:11:12 PM [NORMAL] -     exe: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
9/30/2018 8:11:12 PM [NORMAL] -     args: c:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\module\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.9.1'-AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\module'-EnableConsoleRepl -LogLevel 'Verbose' -LogPath 'c:\Users\Keith\GitHub\rkeithhill\vscode-powershell\logs\1538359867-someValue.sessionId\EditorServices.log' -SessionDetailsPath 'c:\Users\Keith\GitHub\rkeithhill\vscode-powershell\sessions\PSES-VSCode-12072-194919' -FeatureFlags @('PSReadLine')

You can see that -AdditionalModules runs together with the previous arg. Same for -EnableConsoleRepl.

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

The current code works because the previous arg is quoted.  For example, this is legal:
Foo -Version '1.2.3.4'-NextParameter
But this is not good form, so adding spaces between params.
Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

We'll merge to master and rebase into 2.0.0 after that

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch Keith! LGTM

@rjmholt rjmholt merged commit 2a282b1 into master Oct 1, 2018
@rjmholt rjmholt deleted the rkeithhill/add-spaces-start-pseditoservices branch October 9, 2018 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants