Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output from tasks is not streaming #190

Closed
sheerun opened this issue Mar 19, 2019 · 4 comments · Fixed by #200
Closed

Output from tasks is not streaming #190

sheerun opened this issue Mar 19, 2019 · 4 comments · Fixed by #200

Comments

@sheerun
Copy link

sheerun commented Mar 19, 2019

I have long-running task that outputs some logs in the console. Unfortunately when it's run through go-task, the output is displayed only when task finishes, which can take long time.

Is it possible to receive streaming output from currently executed task? i.e. how to make go-task output line of logs immediately after running task is outputting it

@andreynering
Copy link
Member

Hi @sheerun,

Task has a configuration to choose how it redirects output from commands: https://taskfile.dev/#/usage?id=output-syntax

Which one are you using? (Default is interleaved).

The behavior you're describing is the expected for group. But if you're interleaved or prefixed then we have a bug, and I'll need to know form you how to reproduce it.

@andreynering andreynering added the type: bug Something not working as intended. label Mar 23, 2019
@sheerun
Copy link
Author

sheerun commented Mar 24, 2019

I'm using the defaults. Here is my Taskfile:

version: '2'

tasks:
  default:
    cmds:
      - ruby -e "10.times { |i| puts i; sleep 1 }"

I'd expect that it has streaming output

@andreynering
Copy link
Member

Indeed, there seems to be a bug there.

I haven't noticed that for other commands. Maybe it's specific to Ruby.

andreynering added a commit that referenced this issue Apr 21, 2019
This seems to fix some of the bugs reported by issues like #114 and #190.

Seems that the standard library's os/exec package has some black magic to
detect if a writer is an actual *os.File, and some stuff are handled
differently, then.

Fixes #114
Fixes #190
@andreynering
Copy link
Member

Hi @sheerun,

This should be fixed on master on after #200. Please, let me know if you're still experiencing problems.

@pd93 pd93 removed the type: bug Something not working as intended. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants