I have a trigger defined like this:
if [[ "$(p4 -Ztag -F %desc% describe -s $1 2>&1)" =~ ^([(Misc|Bug-Dev|Bug-Live|Feature|Public)])+ [a-zA-Z0-9]+.* ]]
then
exit 0
else
echo $1
echo $(p4 -Ztag -F %desc% describe -s $1 2>&1)
echo "Nothing"
echo " Invalid commit message"
echo " Expected commit message format:"
echo " [Type] Message"
echo " where there can be multiple tags of Type:"
echo " Misc|Bug-Dev|Bug-Live|Feature|Public"
exit 1
fi
Running command p4 -Ztag -F %desc% describe -s $1 2>&1
on my local machine works without issues, I get the submit message.
However, if I try to submit anything, I get the following result:
Notice that the line where the output of echo $(p4 -Ztag -F %desc% describe -s $1 2>&1)
would go is empty.
What is going on here?