Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Pilot Lvl 2
Message 1 of 4

First use of 'echo ::group::name' in script does not work properly

When running a bash script which uses grouping

#!/bin/bash

echo Text echo ::group::Git stuff git clone ... echo ::endgroup::

called from workflow as

- name: something
run: ./my-script.sh

output of git clone is displayed before other script output.

 

Expected

Text
▶ Git stuff

Current

Cloning into..
Text
▶ Git stuff

 

runner v2.158.0

 

3 Replies
GitHub Staff
Message 2 of 4

Re: First use of 'echo ::group::name' in script does not work properly

Hey @wipe2238 ,

Are you able to provide a link to the run where you are seeing this behavior? I have not been able to reproduce this issue. How frequently does this occur for you?

Highlighted
Pilot Lvl 2
Message 3 of 4

Re: First use of 'echo ::group::name' in script does not work properly

GitHub Staff
Message 4 of 4

Re: First use of 'echo ::group::name' in script does not work properly

Hey @wipe2238 ,

 

Thanks so much for the report and detailed examples! I've been able to reproduce and find the root cause.

We have filed a bug for this issue so our team can work on a fix:

Items sent to stderr may be processed before stdout commands are processed, resulting in what you are seeing.

 

As for current workarounds:

You may want try piping git output from stderr to stdout.

 

It appears git clone outputs to the error stream: https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-clone.html

 

Thanks again!