-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix: Correct Windows Terminal default profile path to PowerShell 7 #3032
base: main
Are you sure you want to change the base?
Conversation
Hello, @Anmol-sudo! Thanks for the report, but just to give you a heads-up both PowerShell 5 and PowerShell 7 are on the path by default, it is not necessary to hardcode the paths as their respective entries are added when installed (see attached screenshot): Additionally, this happens if you set PowerShell 7 as the default for Windows Terminal and then uninstall PowerShell 7 using a program like BCUninstaller, as uninstalling PowerShell 7 would remove it from your path, even if the path entry for it remains. |
Thanks |
It's more on me than anything else, I won't report it as it's caused by user error, I am fixing that now, this PR should remain focused on the initial topic. |
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 path is incorrect this should use $env:HOMEDRIVE instead of C:
This ensures it will work on non-standard installs where C: isn't the home drive.
Type of Change
Description
This pull request addresses an issue with the Windows Terminal configuration in the Invoke-WPFTweakPS7 function. Previously, the function was unable to correctly locate or interact with the PowerShell 7 installation due to an incorrect path.
The changes include:
These modifications ensure proper functionality of PowerShell 7 related tweaks and improve the reliability of PowerShell 7 operations in the winutil script.
Testing
I have tested these changes by:
Impact
This fix will improve the user experience for those using the PowerShell 7 tweak, ensuring that their Windows Terminal is correctly configured. It also adds robustness to the script by improving error handling.
Additional Information
This change does not introduce any new dependencies and should be backwards compatible with existing setups.
Checklist