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

Appearance settings

Move processing of -WorkingDirectory before processing of profiles for pwsh.exe#8079

Merged
adityapatwardhan merged 1 commit into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:console-working-dirSteveL-MSFT/PowerShell:console-working-dirCopy head branch name to clipboard
Oct 29, 2018
Merged

Move processing of -WorkingDirectory before processing of profiles for pwsh.exe#8079
adityapatwardhan merged 1 commit into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:console-working-dirSteveL-MSFT/PowerShell:console-working-dirCopy head branch name to clipboard

Conversation

@SteveL-MSFT

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

Copy link
Copy Markdown
Member

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

@bergmeister bergmeister left a comment

Copy link
Copy Markdown
Contributor

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

SteveL-MSFT commented Oct 24, 2018

Copy link
Copy Markdown
Member Author

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

@anmenaga anmenaga left a comment

Copy link
Copy Markdown

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.