Skip to content

Commit

Permalink
handle absolute destination with magic patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
lselden committed Jul 25, 2022
1 parent 15f9557 commit d65e1d0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ const preprocessDestinationPath = ({entry, destination, options}) => {

return path.join(options.cwd, destination, entry.name);
}

if (path.isAbsolute(destination)) {
return path.join(
path.relative(options.cwd, destination),
path.relative(entry.pattern.normalizedPath, entry.path),
);
}

return path.join(
destination,
Expand Down

0 comments on commit d65e1d0

Please sign in to comment.