-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 Environment.getUserRootDirectory() on Non-Windows Platforms #6581
Fix Environment.getUserRootDirectory() on Non-Windows Platforms #6581
Conversation
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.
Thanks for the PR! Can you please generate changefiles (npm run beachball:change from the root of the repo) and add a test?
0000eab
to
a65b8cb
Compare
@tnorling: I amended my original commit with a more informative commit message and a test (and it even fails on the previous commit, but passes with this change 😄). Also ran beachball, so I think everything should be in order now |
054b68c
to
7e5ce20
Compare
@rzyns Please allow edits from maintainers on this pull request so that we can update from the base branch and get this merged. |
7e5ce20
to
0b8a997
Compare
@tnorling, I updated with rebase as I did in #6600, but AFAIK, I can't allow edits from maintainers because the fork is owned by an organization, and not a user-owned repository. If you know a solution to that, please do let me know :) |
Please see CI failures related to formatting (you can run |
…de path msal-node-extensions: `Environment.getUserHomeDirOnUnix()` was never called, because `!this.isWindowsPlatform` would always be false, since `isWindowsPlatform()` is a static method and not a property getter (or property) Signed-off-by: Janusz Dziurzynski <[email protected]>
9c5db2a
to
9fbad50
Compare
@tnorling: I just amended the original commit since the formatting issue was just a missing semicolon, and I've rebased on top of the |
fix:
Environment.getUserRootDirectory()
only ever executes Windows code pathFrom the Azure msal-node docs:
The existing (broken) code:
microsoft-authentication-library-for-js/extensions/msal-node-extensions/src/utils/Environment.ts
Lines 59 to 63 in 9934e3b
msal-node-extensions:
Environment.getUserHomeDirOnUnix()
was never called, because!this.isWindowsPlatform
would always be false, sinceisWindowsPlatform()
is a static method and not a property getter (or property)