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