Skip to content

fix: dont patch getuid and getgid on process anymore #809#847

Merged
G-Rath merged 1 commit intostreamich:masterfrom
aleen42:master
Jun 24, 2022
Merged

fix: dont patch getuid and getgid on process anymore #809#847
G-Rath merged 1 commit intostreamich:masterfrom
aleen42:master

Conversation

@aleen42
Copy link
Copy Markdown
Contributor

@aleen42 aleen42 commented Jun 7, 2022

Resolves #809

Copy link
Copy Markdown
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?

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
Copy Markdown
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
Copy Markdown
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