Skip to content

Commit 8ef6120

Browse files
committed
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.
1 parent ddf84b1 commit 8ef6120

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ async function watch_dependencies(packed_dependencies, { cwd, modules_path }) {
244244
throw new Error(`Could not find the package to which the file belongs to: '${source_path}'`);
245245
}
246246

247-
const filename = path.relative(parent_dependency.local_package_path, source_path);
248-
const target_path = path.resolve(parent_dependency.installed_package_path, filename);
247+
const filename = definitely_posix(path.relative(parent_dependency.local_package_path, source_path));
248+
const target_path = definitely_posix(path.resolve(parent_dependency.installed_package_path, filename));
249249

250250
return {
251251
package_name: parent_dependency.local_dependency_name,

0 commit comments

Comments
 (0)