Skip to content

Commit

Permalink
fix: incorrect relative path calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Nov 14, 2023
1 parent 661d03e commit d63577d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sdks/node/src/domain/core/fs/cyan_fs_helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ export class CyanFileHelper {

readAsStream(g: CyanGlob): VirtualFileStream[] {
const globRoot = this.globDir(g);
const matched = glob
.globSync(g.glob, { cwd: globRoot, ignore: g.exclude })
.map((x) => path.relative(globRoot, x));
const matched = glob.globSync(g.glob, { cwd: globRoot, ignore: g.exclude });

return matched.map(
(x) =>
Expand All @@ -63,7 +61,6 @@ export class CyanFileHelper {

return glob
.globSync(g.glob, { cwd: globRoot, ignore: g.exclude })
.map((x) => path.relative(globRoot, x))
.map((x) => new VirtualFileReference(globRoot, this.writeDir, x));
}

Expand All @@ -76,7 +73,6 @@ export class CyanFileHelper {

const files = glob
.globSync(copy.glob, { cwd: globRoot, ignore: copy.exclude })
.map((x) => path.relative(globRoot, x))
.map((x) => [path.join(globRoot, x), path.join(this.writeDir, x)]);

for (const [read, write] of files) {
Expand Down

0 comments on commit d63577d

Please sign in to comment.