Skip to content

cli: NODE_OPTIONS does not support --require/-r + path with spaces #12971

Closed
@vsemozhetbyt

Description

@vsemozhetbyt
  • Version: v8.0.0 nightly 2017 05 07
  • Platform: Windows 7 x64
  • Subsystem: cli

Refs: #12028

test.js:

'use strict';

console.log('B');

module.js:

console.log('A');

"mo dule.js":

console.log('A');

Compare:

> node -r ./module.js test.js
A
B

> set NODE_OPTIONS=-r ./module.js

> set NODE_OPTIONS
NODE_OPTIONS=-r ./module.js

> node test.js
A
B
> node -r "./mo dule.js" test.js
A
B

> set NODE_OPTIONS=-r "./mo dule.js"

> set NODE_OPTIONS
NODE_OPTIONS=-r "./mo dule.js"

> node test.js
node: dule.js" is not supported in NODE_OPTIONS

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliIssues and PRs related to the Node.js command line interface.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions