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

fs: check for symlink support in fs-promises test #19018

Closed
wants to merge 1 commit into from

Conversation

sethbrenith
Copy link
Contributor

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), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)
  • fs

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 26, 2018
try {
await symlink(newPath, newLink);
} catch (err) {
// Non-admin users on Windows can't make symlinks and get EPERM.
Copy link
Member

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?

Copy link
Contributor Author

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!

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, thanks!

@Leko
Copy link
Contributor

Leko commented Feb 28, 2018

@Leko
Copy link
Contributor

Leko commented Feb 28, 2018

CI failed but it seems not related to this PR.
I've created an issue #19058

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.
@sethbrenith sethbrenith changed the title fs: check for EPERM in fs-promises test fs: check for symlink support in fs-promises test Feb 28, 2018
@BridgeAR
Copy link
Member

BridgeAR commented Mar 1, 2018

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 1, 2018
@Leko
Copy link
Contributor

Leko commented Mar 3, 2018

Landed in 96b2d8d

@Leko Leko closed this Mar 3, 2018
Leko pushed a commit that referenced this pull request Mar 3, 2018
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]>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants