Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): ENG-6005 add exit code for failed actions #2787

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

crherman7
Copy link
Contributor

@crherman7 crherman7 commented Jan 22, 2025

Describe your changes

Add exit code when an action fails via the cli.

Issue ticket number and link

https://brandingbrand.atlassian.net/browse/ENG-6005

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Test Plan

  • yarn test
  • malform the template podfile
  • run the cli
  • verify failure
          ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
          ▒▒                   ▒▒▒
          ▒▒                 ▒▒▒
          ▒▒               ▒▒▒
          ▒▒             ▒▒▒
          ▒▒           ▒▒▒
          ▒▒         ▒▒▒
          ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
          ▒▒     ▒▒▒           ▒▒▒
          ▒▒   ▒▒▒           ▒▒▒
          ▒▒ ▒▒▒           ▒▒▒
          ▒▒▒▒           ▒▒▒
          ▒▒           ▒▒▒
          ▒▒         ▒▒▒
          ▒▒       ▒▒▒
          ▒▒     ▒▒▒
          ▒▒   ▒▒▒
          ▒▒ ▒▒▒
          ▒▒▒▒

       Flagship Code v13.1.1
Configurable - Extensible - Toolkit

2025-01-22 12:10:20.454 info cli prebuild options
2025-01-22 12:10:20.455 info cli ├─ platform: "native"
2025-01-22 12:10:20.455 info cli ├─ logLevel: "info"
2025-01-22 12:10:20.455 info cli ├─ release: false
2025-01-22 12:10:20.455 info cli ├─ verbose: false
2025-01-22 12:10:20.456 info cli ├─ build: "internal"
2025-01-22 12:10:20.456 info cli ╰─ env: "prod"

2025-01-22 12:10:23.453 error cli Error: Error: failed to run "pod install" for iOS: Command failed with exit code
1: pod install


[!] Invalid `Podfile` file: uninitialized constant Pod::Podfile::INSTALL.

 #  from /Users/christopherherman/git/flagship/apps/example/ios/Podfile:16
 #  -------------------------------------------
 #
 >  FAIL POD INSTALL
 #
 #  -------------------------------------------



[!] Invalid `Podfile` file: uninitialized constant Pod::Podfile::INSTALL.

 #  from /Users/christopherherman/git/flagship/apps/example/ios/Podfile:16
 #  -------------------------------------------
 #  
 >  FAIL POD INSTALL
 #  
 #  -------------------------------------------
    at /Users/christopherherman/git/flagship/packages/cli/dist/index.js:5672:13
    at async /Users/christopherherman/git/flagship/packages/cli/dist/index.js:2910:5
    at async _FlagshipCodeManager.run (/Users/christopherherman/git/flagship/packages/cli-kit/dist/index.js:143:9)
    at async Command.<anonymous> (/Users/christopherherman/git/flagship/packages/cli/dist/index.js:6066:3)
    at async Command.parseAsync (/Users/christopherherman/git/flagship/node_modules/commander/lib/command.js:936:5)

 ▸ flagship-code  [ prebuild ] ✗ fail!
error Command failed with exit code 1.

Checklist before requesting a review

  • A self-review of my code has been completed
  • Tests have been added / updated if required
  • Documentation has been updated to reflect these changes

@crherman7 crherman7 changed the title fix(cli): add exit code for failed actions fix(cli): ENG-6005 add exit code for failed actions Jan 22, 2025
@NickBurkhartBB NickBurkhartBB merged commit 8d6525a into brandingbrand:develop Jan 22, 2025
1 check passed
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.

2 participants