Skip to content
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 bugs with display paths #3157

Merged
merged 2 commits into from Apr 18, 2023
Merged

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Apr 15, 2023

Change

This change fixes two bugs with display paths:

  1. The recent change to use case insensitive ICU for directory name equality inverted the comparison, making the replacement not happen correctly.
  2. The recent change to enable display paths generically left them marked for creation, resulting in errors if directories that required administrator privileges to create did not exist and were requested from an unelevated context (ex. run winget --info from medium IL process when the portable machine links location(s) did not exist).

In addition, I tried to generally make forDisplay apply broadly since it is now allowed to be requested on any path.

Validation

winget --info now contains the expected output instead of an error (2) or the full paths containing the user's account name (1).
A few unit tests that were being hit by the error are also working now.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner April 15, 2023 21:15
@Trenly
Copy link
Contributor

Trenly commented Apr 15, 2023

Thank you for fixing everything I broke 😔

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JohnMcPMS
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@msftrubengu
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@msftrubengu
Copy link
Contributor

Blaming cosmic rays 👾

@msftrubengu msftrubengu merged commit 578f451 into microsoft:master Apr 18, 2023
12 checks passed
@JohnMcPMS JohnMcPMS deleted the fix-disppath branch April 18, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants