Skip to content

Commit 2ad9a0e

Browse files
authored
fix: zip file creation of diff release
- zip file error handling - removed unnesesary renaming
2 parents 10427b9 + 5333c57 commit 2ad9a0e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/core/services/package-manager.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* eslint-disable max-lines */
2+
import { EventEmitter } from 'events';
23
import fs from 'fs';
34
import os from 'os';
45
import path from 'path';
@@ -228,6 +229,9 @@ class PackageManager {
228229
writeStream.on('error', (error) => {
229230
reject(error);
230231
});
232+
(zipFile as unknown as EventEmitter).on('error', (error) => {
233+
reject(error);
234+
});
231235
zipFile.outputStream
232236
.pipe(writeStream)
233237
.on('error', (error) => {

src/core/utils/security.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ export function calcAllFileSha256(directoryPath: string): Promise<Record<string,
183183
const data: Record<string, string> = {};
184184
_.forIn(results, (value, key) => {
185185
let relativePath = path.relative(directoryPath, key);
186-
const matchresult = relativePath.match(/(\/|\\).*/);
187-
if (matchresult) {
188-
relativePath = path.join('CodePush', matchresult[0]);
189-
}
190186
relativePath = slash(relativePath);
191187
data[relativePath] = value;
192188
});

0 commit comments

Comments
 (0)