Not a tty
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Default shells seem to be limited. For example, the following step:
- run: |
ps
echo "$(tty)"
produces:
PID TTY TIME CMD
2587 ? 00:00:02 Runner.Listener
2611 ? 00:00:02 Runner.Worker
2763 ? 00:00:00 bash
2777 ? 00:00:00 ps
not a tty
As a result, multiple tools that can provide pretty coloured logs do not work as expected. This is the case of e.g. colorama or pytest in the Python ecosystem.
A possible workaround is to use docker run --rm -t .... However, this involves installing in the container multiple resources/tools that are already available on the host. Furthermore, I don't know if windows containers are supported on windows-latest jobs.
I tried setting shell: bash -i -l {0}, but I get:
bash: cannot set terminal process group (1291): Inappropriate ioctl for device
bash: no job control in this shell
I tried python -c 'import pty; pty.spawn("/bin/sh")' too, but the job wil run for more than 10min with no output.
Which is the appropriate syntax to get a TTY?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name a repository file or test. Start by reproducing the multiline run step and checking shell and TTY behavior on the runner, including the reported bash and container workarounds. Done would require an accepted way to request a TTY, with behavior clarified for Linux and Windows containers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, docker, python
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100