Skip to content

Conversation

@sushobhit-lt
Copy link
Collaborator

This pull request introduces several updates to improve error handling and environment variable management in the @lambdatest/smartui-cli project. The most significant changes include setting process exit codes on errors across multiple commands and tasks, introducing environment variables for build information, and refining error handling in snapshot processing.

Error handling improvements:

  • Added process.exitCode = 1 in various commands (capture, exec, mergeBuild, upload, uploadFigma) to ensure proper exit codes are set on errors. This change standardizes error handling across the CLI. [1] [2] [3] [4] [5] [6]
  • Updated the exec task to set process.exitCode and reject the promise if a child process exits with a non-zero code.
  • Enhanced error handling in processSnapshot by setting process.exitCode = 1 when snapshot errors are encountered or when the snapshot processing fails entirely.

Environment variable management:

  • Added process.env.SMARTUI_BUILD_ID and process.env.SMARTUI_BUILD_NAME in createBuild and createBuildExec tasks to expose build information as environment variables for downstream processes. [1] [2]

Version update:

  • Bumped the package version in package.json from 4.1.14 to 4.1.15.

@parthlambdatest parthlambdatest merged commit a3a2b3f into prod Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants