Skip to content

os.EOL constant issue #14619

Description

@vishal7201
  • 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

Activity

  1. changed the title [-]version: v8.2.1[/-] [+]version: v8.2.1 [/+] on Aug 4, 2017
  2. changed the title [-]version: v8.2.1 [/-] [+]os.EOL constant issue[/+] on Aug 4, 2017
  3. XadillaX commented on Aug 4, 2017

    @XadillaX
    Contributor

    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.

  4. TimothyGu commented on Aug 4, 2017

    @TimothyGu
    Member

    I'm okay with that.

  5. added
    osIssues and PRs related to the os subsystem.
    on Aug 4, 2017
  6. vishal7201 commented on Aug 4, 2017

    @vishal7201
    ContributorAuthor

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

  7. XadillaX commented on Aug 4, 2017

    @XadillaX
    Contributor

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

  8. vishal7201 commented on Aug 4, 2017

    @vishal7201
    ContributorAuthor

    No problem @XadillaX

  9. added
    wipIssues and PRs that are still a work in progress.
    on Aug 4, 2017
  10. assigned and unassigned on Aug 4, 2017
  11. addaleax commented on Aug 4, 2017

    @addaleax
    Member

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

  12. removed
    wipIssues and PRs that are still a work in progress.
    on Aug 4, 2017
  13. vishal7201 commented on Aug 4, 2017

    @vishal7201
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

osIssues and PRs related to the os subsystem.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions