Description
This PR fixes an issue where the CLI incorrectly reports failure while actually succeeding in pushing packages. The root cause was improper handling of success/failure states in the package push operation.
Changes
- Added proper error handling for file uploads using try/catch blocks
- Fixed the issue where success was reported even when file uploads failed
- Added explicit success return with correct exit code
- Improved error messages for better user feedback
- Added break statement to exit upload loop on first error to prevent partial uploads
Testing
The changes have been tested to ensure:
- Success is only reported when all operations complete successfully
- Failure is properly reported when any part of the push operation fails
- Users receive clear error messages about what went wrong
- Process exits with correct status code (0 for success, 1 for failure)
Impact
This fix improves the reliability of the package push operation and provides better feedback to users about the actual state of their package push.
Related Issues
Fixes #188 - “pushing packages from cli succeeds while telling the user it failed”
/claim #188