Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
apexskier opened this issue Jan 22, 2021 · 1 comment

Comments

@apexskier
Copy link

apexskier commented Jan 22, 2021

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'.

@apexskier apexskier changed the title bug: Paths with /Volumes/Macintosh HD are converted to /Volumes/MacintoshHD bug: String arrays with /Volumes/Macintosh HD are converted to /Volumes/MacintoshHD Jan 22, 2021
@apexskier
Copy link
Author

#35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant