Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRedirecting output of `--exec` command #4556
Comments
This comment has been minimized.
This comment has been minimized.
Output redirection is a feature of shell so you could just run an extra shell, e.g.:
|
This comment has been minimized.
This comment has been minimized.
Ah, yes - that works, of course. Thanks! It would be nice if this was a special case that stack could handle, but I do understand that there are very many file redirection variants supported by various shells, so choosing a (sub)set of them to implement is probably infeasible. |
dbaynard
added
help wanted
and removed
awaiting-response
labels
Feb 5, 2019
This comment has been minimized.
This comment has been minimized.
This belongs in the docs. PRs welcome! |
This comment has been minimized.
This comment has been minimized.
Coming back to this, I can't get the options right for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tomasaschan commentedFeb 4, 2019
I'm running my program with
stack build --file-watch --exec
, but I can't figure out how to redirect its output. If I trythen the output of
stack
is of course also sent there, and the output of subsequent runs of my program are appended to the file, leaving old runs there.If I try
then
>
andoutput.txt
are also sent as arguments tomy-prog
, instead of used to redirect stdout.This applies to
stack
1.9.3, tested both on Windows (PowerShell) and on Ubuntu (Bash).