Skip to content

Enhance additionalPowerShellExes setting #4686

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 3 commits into from
Aug 8, 2023

Conversation

andyleejordan
Copy link
Member

Now the warning that's emitted when an additional PowerShell executable isn't found can be suppressed with a setting. If the setting's value has single or double quotes, it handles it. If the executable name wasn't appended, it handles it. Smarter!

Work in progress because it needs unit tests... @JustinGrote what do you think of this?

@andyleejordan andyleejordan requested a review from a team August 4, 2023 00:30
@andyleejordan
Copy link
Member Author

It might not have been bothering anyone but me, but it was really bothering me.

@JustinGrote JustinGrote self-requested a review August 4, 2023 01:03

// Handle Windows where '.exe' and 'powershell' are things
if (this.platformDetails.operatingSystem === OperatingSystem.Windows) {
if (!exePath.endsWith("pwsh.exe") && !exePath.endsWith("powershell.exe")) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree probably need some tests to validate all these potential permutations, looks good to me though.

Copy link
Member Author

Choose a reason for hiding this comment

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

I realized last night I should also be able to handle the common case of ~/, and share that and the quote-stripping with the cwd setting, and then do a preview and then work on saving the cwd in a cache instead of a setting.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok so I decided that since the Python extension uses untildify I'm fine bringing it too, which means I'll get that taken care of...in the next PR. @JustinGrote could you give this a review? It's got tests now!

@andyleejordan andyleejordan force-pushed the andyleejordan/better-finding branch from ce9f6d7 to 05b837f Compare August 5, 2023 01:09
@andyleejordan andyleejordan changed the title WIP: Enhance additionalPowerShellExes setting Enhance additionalPowerShellExes setting Aug 5, 2023
Now the warning that's emitted when an additional PowerShell executable
isn't found can be suppressed with a setting. If the setting's value has
single or double quotes, it handles it. If the executable name wasn't
appended, it handles it. Smarter!
@andyleejordan andyleejordan force-pushed the andyleejordan/better-finding branch from 05b837f to 350eaff Compare August 5, 2023 01:29
@andyleejordan andyleejordan added Issue-Enhancement A feature request (enhancement). Area-Configuration labels Aug 5, 2023
@andyleejordan andyleejordan enabled auto-merge August 5, 2023 01:38
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.

LGTM!

@andyleejordan andyleejordan added this pull request to the merge queue Aug 8, 2023
Merged via the queue into main with commit 5b330ce Aug 8, 2023
@andyleejordan andyleejordan deleted the andyleejordan/better-finding branch August 8, 2023 13:30
@JustinGrote
Copy link
Collaborator

Sorry for the delay in testing, it LGTM to me too even tho it just got merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Configuration Issue-Enhancement A feature request (enhancement).
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants