Skip to content

Commit

Permalink
fix: only join target and basepath if basepath exists
Browse files Browse the repository at this point in the history
  • Loading branch information
MDavidson17 committed Jun 8, 2023
1 parent 8246608 commit 4487602
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/commands/create-manifest/create-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ export async function createManifest(

for (const filePath of chunk) {
const baseFile = args.flatten ? path.basename(filePath) : filePath.slice(source.length);
const target = fsa.joinAll(targetPath, transformFunc ? transformFunc(baseFile) : baseFile);
let target = targetPath;
// if (targetPath.endsWith('/')) {
// target = fsa.joinAll(targetPath, transformFunc ? transformFunc(baseFile) : baseFile);
// }
if (baseFile) {
target = fsa.joinAll(targetPath, transformFunc ? transformFunc(baseFile) : baseFile);
}
validatePaths(filePath, target);
current.push({ source: filePath, target });
}
Expand Down

0 comments on commit 4487602

Please sign in to comment.