Skip to content

Filenames / dirnames with a leading hyphen: a CLI argument issue #10661

Closed
@vsemozhetbyt

Description

@vsemozhetbyt
  • Version: 7.4.0
  • Platform: Windows 7 x64
  • Subsystem: cli

I don't know if this is a deprecated style in *nix to start filenames with a hyphen, but in Windows, it seems there are no shell problems with it: dir -test or type -test.txt are OK. However, Node.js confuses these names with arguments:

node -test.js
node: bad option: -test.js

node -test\test.js
node: bad option: -test\test.js

If this is a wontfix, maybe it worth to be documented in the 'Command Line Options' doc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions