Open nikhilweee opened 2 years ago
These PS4
variables could be exported in conda_smithy/feedstock_content/.scripts/logging_utils.sh
like so
function startgroup {
# Start a foldable group of log lines
# Pass a single argument, quoted
case ${CI:-} in
azure )
echo "##[group]$1";;
travis )
echo "$1"
echo -en 'travis_fold:start:'"${1// /}"'\\r';;
github_actions )
echo "::group::$1";;
* )
export PS4='\[\e[33m\]+ ${BASH_SOURCE:${#BASH_SOURCE}<80?0:-80}:${LINENO} \[\e[0m\]'
echo "$1";;
esac
} 2> /dev/null
function endgroup {
# End a foldable group of log lines
# Pass a single argument, quoted
case ${CI:-} in
azure )
echo "##[endgroup]";;
travis )
echo -en 'travis_fold:end:'"${1// /}"'\\r';;
github_actions )
echo "::endgroup::";;
* )
export PS4="+ "
esac
} 2> /dev/null
Comment:
I spend a couple days debugging
python-feedstock
. For a newbie like me, I found it pretty helpful to setPS4
in all bash scripts in the feedstock like so. I wonder what the community feels about adding something like this by default to all scripts?