Skip to content

bug: String arrays with /Volumes/Macintosh HD are converted to /Volumes/MacintoshHD #34

@apexskier

Description

@apexskier

I discovered this bug when working on apexskier/nova-eslint#75.

Run the following in a node console:

require("optionator")({
    options: [{ option: "dir", type: "[path::String]" }]
}).parse(["node", "bin", "--dir", "/Volumes/Macintosh HD/test path"])

Expected output:

{ dir: [ '/Volumes/Macintosh HD/test path' ], _: [] }

Actual output:

{ dir: [ '/Volumes/MacintoshHD/test path' ], _: [] }

This appears to reproduce with the type [String] as well. It doesn't seem to generally strip the first space "/Volum es/Maci ntosh HD/test path" results in '/Volum es/Macintosh HD/test path'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions