Skip to content

Commit 2366e99

Browse files
committed
chore: revert zip.ts changes
1 parent 005bb3f commit 2366e99

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

  • packages/cli/src/lib/defaults/infra-modules/http/server/src/utils

packages/cli/src/lib/defaults/infra-modules/http/server/src/utils/zip.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,8 @@ export class Zip {
2424
}
2525

2626
public createZip(sourceDir: string, outputPath: string): Promise<boolean> {
27-
if (!fse.lstatSync(sourceDir).isDirectory()) {
28-
throw new Error(`Zip sourceDir '${sourceDir}' is not a directory.`);
29-
}
30-
3127
fse.readdirSync(sourceDir).forEach(file => {
32-
const filePath = path.join(sourceDir, sanitize(file));
33-
this._zip.file(file, fse.readFileSync(filePath))
28+
this._zip.file(file, fse.readFileSync(`${sourceDir}/${file}`))
3429
})
3530
return this._generateNodeZip(outputPath);
3631
}

0 commit comments

Comments
 (0)