Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: remove empty name check in node_env_var.cc
The empty name check has been removed since this has landed:
libuv/libuv#2473
  • Loading branch information
RaisinTen committed Dec 13, 2020
commit 76ae744f3cb04cfd735697cad27d14a4041c2522
4 changes: 1 addition & 3 deletions src/node_env_var.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ Local<Array> RealEnvStore::Enumerate(Isolate* isolate) const {
for (int i = 0; i < count; i++) {
#ifdef _WIN32
// If the key starts with '=' it is a hidden environment variable.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I’m not sure why this line is being removed, though?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Whoops, I'll add that back in. Thanks for reviewing. :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

// The '\0' check is a workaround for the bug behind
// https://github.com/libuv/libuv/pull/2473 and can be removed later.
if (items[i].name[0] == '=' || items[i].name[0] == '\0') continue;
if (items[i].name[0] == '=') continue;
#endif
MaybeLocal<String> str = String::NewFromUtf8(isolate, items[i].name);
if (str.IsEmpty()) {
Expand Down