-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
fs: check for symlink support in fs-promises test #19018
Conversation
test/parallel/test-fs-promises.js
Outdated
try { | ||
await symlink(newPath, newLink); | ||
} catch (err) { | ||
// Non-admin users on Windows can't make symlinks and get EPERM. |
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.
Can you check that this only happens when common.isWindows === true
?
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.
Sounds good, added that check. Thanks!
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.
We already have common.canCreateSymLink()
for such checks.
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.
Much better, thanks!
5b9f52a
to
b89f851
Compare
CI failed but it seems not related to this PR. |
b89f851
to
28df769
Compare
Attempting to make symlinks as a non-administrator user in Windows causes a permission error. We need to update test-fs-promises to avoid making symlinks if the platform does not support it.
28df769
to
b7dc6f0
Compare
Landed in 96b2d8d |
Attempting to make symlinks as a non-administrator user in Windows causes a permission error. We need to update test-fs-promises to avoid making symlinks if the platform does not support it. PR-URL: #19018 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Attempting to make symlinks as a non-administrator user in Windows causes a permission error. We need to update test-fs-promises to avoid making symlinks if the platform does not support it. PR-URL: nodejs#19018 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Attempting to make symlinks as a non-administrator user in Windows
causes a permission error. We need to update test-fs-promises to expect
this error case, as is already done in various other tests.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)