Merge pull request #139 from sigprof/collapse-log-output

install-nix.sh: Collapse log messages
This commit is contained in:
Domen Kožar 2022-07-13 15:20:48 -05:00 committed by GitHub
commit 92d36226ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,9 @@ if type -p nix &>/dev/null ; then
exit
fi
# GitHub command to put the following log messages into a group which is collapsed by default
echo "::group::Installing Nix"
# Create a temporary workdir
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
@ -84,3 +87,6 @@ echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH"
if [[ $INPUT_NIX_PATH != "" ]]; then
echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"
fi
# Close the log message group which was opened above
echo "::endgroup::"