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

os.EOL constant issue #14619

Closed
vishal7201 opened this issue Aug 4, 2017 · 7 comments
Closed

os.EOL constant issue #14619

vishal7201 opened this issue Aug 4, 2017 · 7 comments
Assignees
Labels
os Issues and PRs related to the os subsystem.

Comments

@vishal7201
Copy link
Contributor

vishal7201 commented Aug 4, 2017

  • Version:
  • Platform:
  • Subsystem:

Version : v8.2.1
Platform: Windows (64 bit)

Code

const os = require('os');
console.log(os.EOL + " is the EOL");
os.EOL = "12345"
console.log(os.EOL + " is the EOL");

Output

 is the EOL
12345 is the EOL

os.EOL is specified as a constant but its value is getting updated

@vishal7201 vishal7201 changed the title version: v8.2.1 version: v8.2.1 Aug 4, 2017
@vishal7201 vishal7201 changed the title version: v8.2.1 os.EOL constant issue Aug 4, 2017
@XadillaX
Copy link
Contributor

XadillaX commented Aug 4, 2017

I think we may define os.EOL by using Object.defineProperty with not configurable and not writable? Then we mark that update with SEMVER-MAJOR?

If we can do that, I'll take this work.

@TimothyGu
Copy link
Member

I'm okay with that.

@mscdex mscdex added the os Issues and PRs related to the os subsystem. label Aug 4, 2017
@vishal7201
Copy link
Contributor Author

I'd love to address this issue! How can I submit a PR for this?

XadillaX added a commit to XadillaX/node that referenced this issue Aug 4, 2017
@XadillaX
Copy link
Contributor

XadillaX commented Aug 4, 2017

@vishal7201 Sorry but I just saw your reply after I finished the PR.

@vishal7201
Copy link
Contributor Author

No problem @XadillaX

@refack refack added the wip Issues and PRs that are still a work in progress. label Aug 4, 2017
@refack refack assigned refack and XadillaX and unassigned refack Aug 4, 2017
@addaleax
Copy link
Member

addaleax commented Aug 4, 2017

@vishal7201 How did you discover this? Is this causing issues for you?

@mscdex mscdex removed the wip Issues and PRs that are still a work in progress. label Aug 4, 2017
@vishal7201
Copy link
Contributor Author

@addaleax I was just playing with os module in REPL mode and just figured it out!

XadillaX added a commit to XadillaX/node that referenced this issue Aug 17, 2017
@refack refack closed this as completed in f6caeb9 Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os Issues and PRs related to the os subsystem.
Projects
None yet
Development

No branches or pull requests

6 participants