Skip to content

Commit 4e1e5e0

Browse files
code clean up
1 parent d5fee3e commit 4e1e5e0

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

src/commander/commander.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ program
2929
.addCommand(configWebFigma)
3030
.addCommand(uploadWebFigmaCommand)
3131

32-
33-
34-
export default program;
32+
export default program;

src/lib/httpClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export default class httpClient {
119119
finalizeBuild(buildId: string, totalSnapshots: number, log: Logger) {
120120
let params: Record<string, string | number> = {buildId};
121121
if (totalSnapshots > -1) params.totalSnapshots = totalSnapshots;
122+
122123
return this.request({
123124
url: '/build',
124125
method: 'DELETE',

src/lib/snapshotQueue.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ export default class Queue {
272272

273273
if (!this.ctx.config.delayedUpload && snapshot && snapshot.name && this.snapshotNames.includes(snapshot.name)) {
274274
drop = true;
275-
this.ctx.log.debug(`snapshot names are ${this.snapshotNames}`)
276275
this.ctx.log.info(`Skipping duplicate SmartUI snapshot '${snapshot.name}'. To capture duplicate screenshots, please set the 'delayedUpload' configuration as true in your config file.`);
277276
}
278277

src/lib/utils.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,11 @@ export function getRenderViewportsForOptions(options: any): Array<Record<string,
217217

218218
// Global SIGINT handler
219219
process.on('SIGINT', async () => {
220-
try {
221-
if (isPollingActive) {
222-
console.log('Fetching results interrupted. Exiting...');
223-
isPollingActive = false;
224-
} else {
225-
console.log('\nExiting gracefully...');
226-
}
227-
} catch (error:any) {
228-
console.error('Error while stopping the server:', error.message);
220+
if (isPollingActive) {
221+
console.log('Fetching results interrupted. Exiting...');
222+
isPollingActive = false;
223+
} else {
224+
console.log('\nExiting gracefully...');
229225
}
230226
process.exit(0);
231227
});

0 commit comments

Comments
 (0)