tags: Log stderr message when mktag command failed
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Addresses the issue reported in Issue #6681.
I initially planned to add a stderr message to the original error so it could be handled at a higher level. However, after seeing the comment about backward compatibility, I decided not to modify the original error, as I wasn't sure where that requirement was coming from:
func (e MktagError) Error() string {
// TODO: Upper-case error message purely for transitory backwards compatibility
return fmt.Sprintf("Could not update refs/tags/%s. Please refresh and try again.", e.tagName)
}
To avoid any potential issues, I chose to log the error message instead of modifying the original error. This way, we can still capture the error details without breaking compatibility.
Edited by 🤖 GitLab Bot 🤖