I'm trying to save the output of a git command to an environment variable in a GitHub Actions step and it's grabbing the first line of the output and leaving off the rest. The container this is running on is ubuntu-latest
.
Here's how I'm trying to capture it:
TMP_CHANGES=`git log origin/master..`
What I expect from echo $TMP_CHANGES
:
commit f179fb811618cc5a2f07637a2ecb394a43ebee21
Author: DannyHinshaw <danny@nulleffort.com>
Date: Tue Jan 14 07:38:29 2020 -0500
Testing commits diff
commit ed596d2ff2e5bd9801eae6ece7abf627db89f82b
Author: DannyHinshaw <danny@nulleffort.com>
Date: Tue Jan 14 07:38:28 2020 -0500
Bump version -> v1.2.1-101
commit 40f88031293aba0221b65ed1d2a8295b651ef91b
Author: DannyHinshaw <danny@nulleffort.com>
Date: Tue Jan 14 07:35:04 2020 -0500
Testing commits diff
What I get:
commit f179fb811618cc5a2f07637a2ecb394a43ebee21
What am I missing? How can I capture and save the full multiline output to the variable while preserving multiline formatting?