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

Does stderr capture the wrong thing, or my config is wrong ? #267

Open
zsimple opened this issue Feb 26, 2020 · 0 comments · May be fixed by #330
Open

Does stderr capture the wrong thing, or my config is wrong ? #267

zsimple opened this issue Feb 26, 2020 · 0 comments · May be fixed by #330
Assignees
Labels

Comments

@zsimple
Copy link

zsimple commented Feb 26, 2020

First thanks for your great work, it a very helpful tool.

I used the docker version, and also tried run jobber in a clean alpine image, it's the same result.

.jobber file

version: 1.4

jobs:
  Example:
    cmd: /root/test.sh
    time: "*"
    notifyOnSuccess:
      - type: stdout
        data: [stdout, stderr]

test.sh

#!/bin/sh

echo "hello stdout"
echo "hello stderr" >&2

The output result was expected to be

{"job":{"command":"/root/test.sh","name":"Example","status":"Good","time":"* * * * * *"},"startTime":1582677064,"stderr":"hello stderr\n","stdout":"hello stdout\n","succeeded":true,"user":"root","version":"1.4"}

But in fact it outputs(watch the stderr field, same as stdout):

{"job":{"command":"/root/test.sh","name":"Example","status":"Good","time":"* * * * * *"},"startTime":1582677064,"stderr":"hello stdout\n","stdout":"hello stdout\n","succeeded":true,"user":"root","version":"1.4"}

By the way, if I use type: filesystem, it works fine.

@dshearer dshearer self-assigned this May 10, 2020
@dshearer dshearer added the bug label May 10, 2020
@TheJuffo TheJuffo linked a pull request Apr 28, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants