Colorize git#1726
Conversation
|
Also @FredericoGauz, when you update this PR could you please include screenshots as well? |
|
Sure! |
| git diff --exit-code | diff-so-fancy | less --tabs=4 -RFX | ||
|
|
||
| # Runs git diff quietly to get the exit code | ||
| declare EXIT_CODE |
There was a problem hiding this comment.
Hmmm does the exit-code from the first git diff basically get swallowed up by the other piped commands? If so, I would just get rid of the --exit-code flag in the first git diff run. I'd be willing to bet that there's a clean way to propagate that exit code through the piped diff-so-fancy and less commands though, which would be preferable.
There was a problem hiding this comment.
Hi @roryabraham , I was going to reply you and David after finishing here.
I totally agree with you, but after running many tests with many options (like trying to get from this line: git diff --exit-code | diff-so-fancy | less --tabs=4 -RFX) and also (if [[ EXIT_CODE -eq 0 ]]; ) this directly nothing gave the the first exist code of the pipeline. I tried for a few hours with all the things I could think of.
There was a problem hiding this comment.
While I understand that an extra variable is not ideal, that was the best I could do.
There was a problem hiding this comment.
Okay, I suck at using bash so I'm not sure I have a better suggestion. I'm not super worried about it, but maybe @bondydaa knows how to do this with some bash wizardry?
|
@FredericoGauz Can you please retest this by:
|
|
Hi @roryabraham and @bondydaa, sorry for the late reply. I did the changes requested (it was quite clever to save the whole output in a variable!) and also run the tests you required. The link for the failing action is: https://github.com/Expensify/Expensify.cash/pull/1726/checks?check_run_id=2184601524 I hope that this is what is need, but let me know if I can help with anything else! |
roryabraham
left a comment
There was a problem hiding this comment.
Okay, LGTM. All yours @bondydaa




Details
Adds a better way to see differences between action diffs.
Fixed Issues
#1665
Changes
Adds a temporary Library to the GitHub workflow that reflect better the changes in files