You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tell us about what you're trying to solve. What challenges are you facing?
I assume this is a limitation of the rendezvous protocol, but when using the heroku run command, stdout and stderr streams are not separated, leading to mixed output. This behavior deviates from typical Unix command behavior where stdout and stderr are distinct. For example, if you were to run a Rake task that exports a CSV to stdout and prints a digest to stderr, the resulting file includes both outputs. This makes the CSV file invalid.
Local example
rake export:csv > export.csv
# Output to stderr: 50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c
cat export.csv
# Result: a valid CSV file
Heroku example
heroku run rake export:csv > export.csv
# Output to stderr: <nothing>
cat export.csv
# Result: a malformed CSV file
Typically, if you wanted to combine stdout and stderr, you'd explicitly use 2>&1.
Required Terms
What service(s) is this request for?
CLI
Tell us about what you're trying to solve. What challenges are you facing?
I assume this is a limitation of the rendezvous protocol, but when using the
heroku run
command, stdout and stderr streams are not separated, leading to mixed output. This behavior deviates from typical Unix command behavior where stdout and stderr are distinct. For example, if you were to run a Rake task that exports a CSV to stdout and prints a digest to stderr, the resulting file includes both outputs. This makes the CSV file invalid.Local example
Heroku example
Typically, if you wanted to combine stdout and stderr, you'd explicitly use
2>&1
.Refs: heroku/cli#1835, heroku/legacy-cli#1214
The text was updated successfully, but these errors were encountered: