Skip to content

Commit

Permalink
fix: Use POSIX path separator also in get_target_path
Browse files Browse the repository at this point in the history
This mainly affects only the watcher console messages, as `fs.copyFile` or `rimraf` should handle path separators correctly.
  • Loading branch information
bencergazda committed Nov 29, 2021
1 parent ddf84b1 commit 8ef6120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8ef6120

Please sign in to comment.