-
Notifications
You must be signed in to change notification settings - Fork 92
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(fs): realpathSync.native
sometimes fails on Windows
#2224
Conversation
Signed-off-by: Trae Yelovich <[email protected]>
You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2224 +/- ##
=======================================
Coverage 91.46% 91.46%
=======================================
Files 89 89
Lines 8856 8857 +1
Branches 1828 1828
=======================================
+ Hits 8100 8101 +1
Misses 755 755
Partials 1 1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
realpathSync.native
sometimes fails on Windows
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.
LGTM and this should help us to support RAM disks on Windows, thanks @traeok!
Do we want to add a line to the ZE changelog for this fix? |
Signed-off-by: Trae Yelovich <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
User confirmed that this fixes their issue.
LGTM! 😋
Proposed changes
Sometimes
fs.realpathSync.native
will throw an error on Windows. Previously, we were defaulting to this method for Windows systems, but were not catching any exceptions from this function withingetFullPath
.This proposes a fallback to
fs.realpathSync
whenfs.realpathSync.native
throws an error. Thanks @t1m0thyj for finding where realpath was referenced and for the helpful discussion 🙂Inspired by this issue, from a repo that proposed the addition of this implementation into Node.js.
Release Notes
Milestone: 2.8.0
Changelog:
Types of changes
What types of changes does your code introduce to Zowe Explorer?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the revieweryarn workspace vscode-extension-for-zowe vscode:prepublish
has been executed