Skip to content

Error output should be consistent across all platforms. #681

@nfischer

Description

@nfischer

Some ShellJS commands have error output which varies between unix and Windows. File paths are a big issue, since Windows will output path.join('foo', 'bar') as foo\bar, whereas unix is foo/bar.

I think the best approach is to write a helper in common which correctly translates \ to / where appropriate (and handles any necessary escaping). Commands should be automatically opted into this behavior. We should discuss if it's responsible to provide an opt-out mechanism (do we really want to promote inconsistent behavior across platforms?).

If we can make this change without modifying any existing test cases, then I think we should treat this as a non-breaking bug and include it in a patch. Otherwise, we'll need to treat it as a breaking change.

This would make testing much easier, so I'm marking this as blocking #671

Metadata

Metadata

Assignees

Labels

fixBug/defect, or a fix for such a problemhigh priority

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions