Fall back to using environment variables when os.hostname fails#5
Fall back to using environment variables when os.hostname fails#5hamudi-ahmed merged 1 commit intomasterfrom
Conversation
|
@yousif-bugsnag As an author of the pull request in the original library I need to mention that the comment from the library author about the increase of collision likelihood was given for an initial version of the patch, which was later updated. Reaction of the library author to the updated version was much more positive. |
|
@FlyingDR yes absolutely - sorry if my PR comment wasn't very clear in that regard. Our current fix in v3.0.1 of And thank you for all your efforts and contributions on this issue! |
|
Glad to see it as a PR for Bugsnag :) bugsnag/bugsnag-js#1783 is worth mentioning here since it clearly depends on this PR |
v3.0.1 added a simple guard around
os.hostnameto prevent a crash on Windows 7 - however the original library authors have correctly pointed out that this significantly increases the likelihood of collisions on Win 7 - paralleldrive#264 (comment)This is a port of @FlyingDR's PR on the original cuid library (paralleldrive#264) which improves that fix by attempting to fall back to environment variables when os.hostname fails.