Skip to content

Print diagnostic when failing to get VSN with Git#2804

Merged
ferd merged 1 commit intoerlang:mainfrom
berbiche:fix/diagnostic-logging-for-git-vsn-command
Jul 5, 2023
Merged

Print diagnostic when failing to get VSN with Git#2804
ferd merged 1 commit intoerlang:mainfrom
berbiche:fix/diagnostic-logging-for-git-vsn-command

Conversation

@berbiche
Copy link
Contributor

@berbiche berbiche commented Jul 4, 2023

The function collect_default_refcount/1 of rebar_git_resource did not log the error message when it failed to get the vsn number with its git log command.

  • A diagnostic error message is now printed with the status code and output message of the failing command.

I encountered this error with GitHub Actions CI (actions/checkout#1169)
and failed to find the appropriate error cause because there was no diagnostic logging from rebar.

According to the CONTRIBUTING documentation, a test should be attached with this PR but I'm not sure how to add a test for this.
Any guidance would be appreciated.

The function `collect_default_refcount/1` of `rebar_git_resource`
did not log the error message when it failed to get the vsn number
with its `git log` command.

A diagnostic error message is now printed with the status code and
output message of the failing command.
@ferd ferd merged commit 64842a2 into erlang:main Jul 5, 2023
@berbiche berbiche deleted the fix/diagnostic-logging-for-git-vsn-command branch July 6, 2023 19:45
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