Skip to content

Commit

Permalink
Fix backslash in mount route under Windows cncjs#551
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchBradley authored and cheton committed Jan 8, 2020
1 parent 4b28f52 commit 7c0caf2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ const parseMountPoint = (val, acc) => {
mount.target = r[2];
}

mount.route = path.join('/', mount.route || '').trim(); // path.join('/', 'pendant') => '/pendant'
// mount.route is interpreted by cncjs code that uses posix syntax
// where the separator is / , so we perform this join in posix mode
// mode to avoid introducing \ separators when running on Windows.
mount.route = path.posix.join('/', mount.route || '').trim(); // path.join('/', 'pendant') => '/pendant'
mount.target = (mount.target || '').trim();

acc.push(mount);
Expand Down

0 comments on commit 7c0caf2

Please sign in to comment.