Skip to content

Commit e58092e

Browse files
authored
Merge pull request #324 from LambdaTest/stage
Release 4.1.21 - Exit Code Addition in Capture
2 parents c7100ca + 442ba64 commit e58092e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/smartui-cli",
3-
"version": "4.1.20",
3+
"version": "4.1.21",
44
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
55
"files": [
66
"dist/**/*"

src/commander/capture.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ command
3939
try {
4040
ctx.webStaticConfig = JSON.parse(fs.readFileSync(file, 'utf8'));
4141
if (!validateWebStaticConfig(ctx.webStaticConfig)){
42-
4342
ctx.log.debug(JSON.stringify(validateWebStaticConfig.errors, null, 2));
4443
// Iterate and add warning for "additionalProperties"
4544
validateWebStaticConfig.errors?.forEach(error => {
@@ -59,6 +58,7 @@ command
5958
}
6059
} catch (error: any) {
6160
ctx.log.error(`Invalid Web Static Config; ${error.message}`);
61+
process.exitCode = 1;
6262
return;
6363
}
6464
//Print Config here in debug mode
@@ -89,6 +89,7 @@ command
8989
} catch (error) {
9090
console.log('\nRefer docs: https://www.lambdatest.com/support/docs/smart-visual-regression-testing/');
9191
process.exitCode = 1;
92+
throw new Error();
9293
}
9394

9495
})

src/lib/ctx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default (options: Record<string, string>): Context => {
7373
}
7474
} catch (error: any) {
7575
console.log(`[smartui] Error: ${error.message}`);
76-
process.exit();
76+
process.exit(1);
7777
}
7878

7979
if (config.web) {

0 commit comments

Comments
 (0)