File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 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/**/*"
Original file line number Diff line number Diff line change @@ -39,17 +39,18 @@ 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 => {
4645 if ( error . keyword === "additionalProperties" ) {
4746 ctx . log . warn ( `Additional property "${ error . params . additionalProperty } " is not allowed.` )
4847 } else {
4948 const validationError = error . message ;
49+ process . exit ( 1 ) ;
5050 throw new Error ( validationError || 'Invalid Web Static config found in file : ' + file ) ;
5151 }
5252 } ) ;
53+ process . exit ( 1 ) ;
5354 throw new Error ( validateWebStaticConfig . errors [ 0 ] ?. message ) ;
5455 }
5556
@@ -59,6 +60,7 @@ command
5960 }
6061 } catch ( error : any ) {
6162 ctx . log . error ( `Invalid Web Static Config; ${ error . message } ` ) ;
63+ process . exitCode = 1 ;
6264 return ;
6365 }
6466 //Print Config here in debug mode
@@ -89,6 +91,7 @@ command
8991 } catch ( error ) {
9092 console . log ( '\nRefer docs: https://www.lambdatest.com/support/docs/smart-visual-regression-testing/' ) ;
9193 process . exitCode = 1 ;
94+ throw new Error ( ) ;
9295 }
9396
9497 } )
Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments