We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 005bb3f commit 2366e99Copy full SHA for 2366e99
1 file changed
packages/cli/src/lib/defaults/infra-modules/http/server/src/utils/zip.ts
@@ -24,13 +24,8 @@ export class Zip {
24
}
25
26
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
-
31
fse.readdirSync(sourceDir).forEach(file => {
32
- const filePath = path.join(sourceDir, sanitize(file));
33
- this._zip.file(file, fse.readFileSync(filePath))
+ this._zip.file(file, fse.readFileSync(`${sourceDir}/${file}`))
34
})
35
return this._generateNodeZip(outputPath);
36
0 commit comments