Skip to content

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

@zsimple

Description

@zsimple

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions