Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Oct 19, 2018

PR Summary

Without this change, the processing of -WorkingDirectory happens after processing $PROFILE (all the profiles). This means that any $PROFILE that explicitly uses Set-Location to a desired folder will be ovewritten by -WorkingDirectory ~ which is added to the shortcut for pwsh by default.

The fix is to move the processing of -WorkingDirectory before processing of profiles. Note that this is a breaking change for any $PROFILE that expects to start in $PSHOME instead of ~ but it seems unlikely.

Fix #7895
Fix #8144

PR Checklist

@SteveL-MSFT SteveL-MSFT added Review - Committee The PR/Issue needs a review from the PowerShell Committee Breaking-Change breaking change that may affect users labels Oct 19, 2018
Copy link
Contributor

@bergmeister bergmeister left a comment

Choose a reason for hiding this comment

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

LGTM, I tested it and it works well. Thanks :-)

@SteveL-MSFT SteveL-MSFT added Committee-Reviewed PS-Committee has reviewed this and made a decision and removed Review - Committee The PR/Issue needs a review from the PowerShell Committee labels Oct 24, 2018
@SteveL-MSFT
Copy link
Member Author

SteveL-MSFT commented Oct 24, 2018

@PowerShell/powershell-committee reviewed this and agree with the change

Copy link

@anmenaga anmenaga left a comment

Choose a reason for hiding this comment

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

LGTM.

@adityapatwardhan adityapatwardhan merged commit b1e2745 into PowerShell:master Oct 29, 2018
@SteveL-MSFT SteveL-MSFT deleted the console-working-dir branch March 10, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking-Change breaking change that may affect users Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

4 participants