From 8ef6120e280a8a3fb3b2469ebc680bc0c25e0cc2 Mon Sep 17 00:00:00 2001 From: bencergazda Date: Mon, 29 Nov 2021 17:18:21 +0100 Subject: [PATCH] fix: Use POSIX path separator also in `get_target_path` This mainly affects only the watcher console messages, as `fs.copyFile` or `rimraf` should handle path separators correctly. --- src/project.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/project.js b/src/project.js index 8c6d65d..701e810 100644 --- a/src/project.js +++ b/src/project.js @@ -244,8 +244,8 @@ async function watch_dependencies(packed_dependencies, { cwd, modules_path }) { throw new Error(`Could not find the package to which the file belongs to: '${source_path}'`); } - const filename = path.relative(parent_dependency.local_package_path, source_path); - const target_path = path.resolve(parent_dependency.installed_package_path, filename); + const filename = definitely_posix(path.relative(parent_dependency.local_package_path, source_path)); + const target_path = definitely_posix(path.resolve(parent_dependency.installed_package_path, filename)); return { package_name: parent_dependency.local_dependency_name,