Skip to content

Should spawn with undefined env value be treated as "undefined" string? #15087

Description

@Gerhut
  • Version:

v8.4.0

  • Platform:

Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

  • Subsystem:

child_process

require('child_process').spawn('/usr/local/bin/node', [
  '-p', 'process.env'
], {
  stdio: 'inherit',
  env: { FOO: undefined }
})

yields

{ FOO: 'undefined', __CF_USER_TEXT_ENCODING: '0x1F5:0x19:0x34' }

should undefined/null environment value be transferred to child process?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions