Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove -NonInteractive from PowerShell startup sequence #3847

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
andyleejordan merged 1 commit into master from andschwa/non-interactive
Feb 23, 2022

Conversation

Copy link
Member

@andyleejordan andyleejordan commented Feb 22, 2022

This command-line flag sets a low-level configuration within PowerShell
that prevents Windows PowerShell from using interactive parameters in
scripts (such as in Get-Credential). It does not appear to be
necessary for us to use this flag, so we're going to test without it.

Fixes #3820.

@ghost ghost added the Issue-Bug A bug to squash. label Feb 22, 2022
@andyleejordan andyleejordan marked this pull request as ready for review February 22, 2022 17:39
This command-line flag sets a low-level configuration within PowerShell
that prevents Windows PowerShell from using interactive parameters in
scripts (such as in `Get-Credential`). It does not appear to be
necessary for us to use this flag, so we're going to test without it.
Copy link
Member Author

@SeeminglyScience On PowerShell 5.1 and 7.2.1, the previous bug where the wrong PSReadLine was loaded does not appear to be recurring with this PR. They both loaded the module from the extension path, despite other versions of PSReadLine being available (and loaded in the standalone console).

Copy link
Member Author

Screen Shot 2022年02月22日 at 3 47 20 PM

Seems to solve the problem!
o-l-a-v reacted with thumbs up emoji

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

Ahh that's right. -Command/-File should do the same as long as -NoExit isn't present. LGTM!

@andyleejordan andyleejordan merged commit 2fb293c into master Feb 23, 2022
@andyleejordan andyleejordan deleted the andschwa/non-interactive branch February 23, 2022 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@SeeminglyScience SeeminglyScience SeeminglyScience approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Get-Credential throws exception instead of prompting for input in PowerShell 5.1

AltStyle によって変換されたページ (->オリジナル) /