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: dont patch getuid and getgid on process anymore #809 #847

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

aleen42
Copy link
Contributor

@aleen42 aleen42 commented Jun 7, 2022

Resolves #809

Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

Looks good, just need to restore the uid property.

Would you be open to also replacing getgid in this PR too, since that change is pretty much the same thing?

src/node.ts Show resolved Hide resolved
Comment on lines 9 to 12
it('.getuid() and .getgid()', () => {
expect(typeof proc.getuid()).toBe('number');
expect(typeof proc.getgid()).toBe('number');
expect(typeof proc.getuid?.() ?? 0).toBe('number');
expect(typeof proc.getgid?.() ?? 0).toBe('number');
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: we should remove this test entirely as it's not really covering anything useful now

@G-Rath G-Rath changed the title fix: avoid patching process.getuid under Windows #809 fix: dont patch getuid and getgid on process anymore #809 Jun 24, 2022
@G-Rath G-Rath merged commit 1c19e87 into streamich:master Jun 24, 2022
streamich pushed a commit that referenced this pull request Jun 24, 2022
## [3.4.7](v3.4.6...v3.4.7) (2022-06-24)

### Bug Fixes

* dont patch `getuid` and `getgid` on `process` anymore ([#847](#847)) ([1c19e87](1c19e87))
@streamich
Copy link
Owner

🎉 This PR is included in version 3.4.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Side effect when mocking process.getuid() under Windows
3 participants