-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[command]… output is prepended to exec outStream #649
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I want to redirect a commands output to a file, but I still want the command that I execute to be logged.
Currently the [command]… log is streamed into the outStream, and not to stdout as I would expect.
To Reproduce
Steps to reproduce the behavior:
await exec.exec("echo", ["foobar"], { outStream: fs.createWriteStream("foobar.txt") });
Expected behavior
I want the foobar.txt file to only have foobar in it.
Instead, it will have the [command]echo foobar command output prepended.
Additional context
Not quite sure if this is intentional?
toolkit/packages/exec/src/toolrunner.ts
Lines 424 to 428 in 2bf7365
| if (!optionsNonNull.silent && optionsNonNull.outStream) { | |
| optionsNonNull.outStream.write( | |
| this._getCommandString(optionsNonNull) + os.EOL | |
| ) | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working