From d63577d545fb60d52aaa364d2d27713461638067 Mon Sep 17 00:00:00 2001 From: kirinnee Date: Tue, 14 Nov 2023 13:06:46 +0800 Subject: [PATCH] fix: incorrect relative path calculations --- sdks/node/src/domain/core/fs/cyan_fs_helper.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sdks/node/src/domain/core/fs/cyan_fs_helper.ts b/sdks/node/src/domain/core/fs/cyan_fs_helper.ts index 19cdd83..39164a7 100644 --- a/sdks/node/src/domain/core/fs/cyan_fs_helper.ts +++ b/sdks/node/src/domain/core/fs/cyan_fs_helper.ts @@ -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) => @@ -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)); } @@ -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) {