Skip to content

Commit 63e9602

Browse files
committed
chore: add debug log lines for unzipping build artifacts
1 parent c132bfc commit 63e9602

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/helpers/buildArtifacts.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ const downloadAndUnzip = async (filePath, fileName, url) => {
137137
const unzipFile = async (filePath, fileName) => {
138138
return new Promise( async (resolve, reject) => {
139139
try {
140-
await decompress(path.join(filePath, fileName), filePath)
140+
await decompress(path.join(filePath, fileName), filePath);
141141
resolve();
142142
} catch (error) {
143-
logger.debug(`Error unzipping with decompress: ${error}, trying with unzipper.`);
143+
logger.debug(`Error unzipping with decompress, trying with unzipper. Stacktrace: ${error}.`);
144144
try {
145145
fs.createReadStream(path.join(filePath, fileName))
146146
.pipe(unzipper.Extract({ path: filePath }))
@@ -151,9 +151,9 @@ const unzipFile = async (filePath, fileName) => {
151151
reject(err);
152152
});
153153
} catch (unzipperError) {
154-
logger.debug(`Unzip unsuccessful with unzipper`);
154+
logger.debug(`Unzipper package error: ${unzipperError}`);
155+
reject(Constants.debugMessages.BUILD_ARTIFACTS_UNZIP_FAILURE);
155156
}
156-
reject(Constants.debugMessages.BUILD_ARTIFACTS_UNZIP_FAILURE);
157157
}
158158
});
159159
}

0 commit comments

Comments
 (0)