Skip to content

Commands run by cmd_runner don't work the same as they do when run in the shell. #503

Answered by olimorris
trcoffman asked this question in Q&A
Discussion options

You must be logged in to vote

According to CodeCompanion:

1. By default, the Job implementation in Plenary handles stdout/stderr separately. In the `cmd_runner.lua` implementation (lines 281-332), it's setting up different handlers for stdout and stderr.

2. When running `2>&1` through the shell, it's a shell redirection that combines stderr into stdout. However, when running through Plenary's Job, this redirection may not work as expected since it's not being interpreted by a shell.

...and I've pushed the fix.

In the chat buffer, my steps to solve it were to send the raw version of plenary.job via the fetch slash command. And then use the file slash command to send the cmd_runner .lua tool and the tools.init file be…

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
1 reply
@trcoffman
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@trcoffman
Comment options

@trcoffman
Comment options

@olimorris
Comment options

@olimorris
Comment options

Answer selected by olimorris
@trcoffman
Comment options

@olimorris
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants