-
Notifications
You must be signed in to change notification settings - Fork 513
Add -Login startup option #2400
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
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6322d0e
Add -Login startup option
c47e47c
Improve dummy command
8a4b877
Add explanatory comment
be348b2
switch to .osx & .linux and code clean up
TylerLeonhardt 160ce80
remove import
TylerLeonhardt 87b6c91
rob's feedback
TylerLeonhardt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this throw if it's not the login shell?
Also, did your change to allow PowerShell to be a login shell make it in PS 6.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
child_process
docs say:So when the
-Login
switch is not recognised and PowerShell exits with a non-zero exit code, node throws, we catch and returnfalse
.No, only in 7 I think. But since you can install PowerShell to any path and configure VSCode to pick that up, we have no way of knowing what version a PS executable is, so are forced to run it to check.
I'll add a comment.
I should also say I haven't tested this, since I've been working on Windows. Why it's still in draft.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I meant that I think
-Login
existed in 6.2 but it was a no-op so that might be a false positive... Or maybe that was just-l
I can't remember.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh, I see! We might need @SteveL-MSFT's thoughts there. I think there was indeed a
-l
in either 6.2 or a 7 preview, although it possibly was short for-LoadProfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rjmholt is correct, 6.2 only supported
-l
as short for-loadprofile
making it "compatible" with Unix expecting-l
to be accepted.-login
will fail on 6.2There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in 6.2.2 @SteveL-MSFT . This is a weird error output, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My memory is failing me. Looks like it was added in 7.0 but has been superceded by Rob's change to support -login: PowerShell/PowerShell#9528