{"action":"created","issue":{"url":"https://api.github.com/repos/heroku/heroku/issues/1214","labels_url":"https://api.github.com/repos/heroku/heroku/issues/1214/labels{/name}","comments_url":"https://api.github.com/repos/heroku/heroku/issues/1214/comments","events_url":"https://api.github.com/repos/heroku/heroku/issues/1214/events","html_url":"https://github.com/heroku/heroku/issues/1214","id":44004463,"number":1214,"title":"Heroku run: properly pipe stderr to stderr","user":{"login":"aseemk","id":537838,"avatar_url":"https://avatars.githubusercontent.com/u/537838?v=3","gravatar_id":"","url":"https://api.github.com/users/aseemk","html_url":"https://github.com/aseemk","followers_url":"https://api.github.com/users/aseemk/followers","following_url":"https://api.github.com/users/aseemk/following{/other_user}","gists_url":"https://api.github.com/users/aseemk/gists{/gist_id}","starred_url":"https://api.github.com/users/aseemk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aseemk/subscriptions","organizations_url":"https://api.github.com/users/aseemk/orgs","repos_url":"https://api.github.com/users/aseemk/repos","events_url":"https://api.github.com/users/aseemk/events{/privacy}","received_events_url":"https://api.github.com/users/aseemk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-09-26T05:45:09Z","updated_at":"2015-01-28T17:01:12Z","closed_at":null,"body":"Right now, all output from a `heroku run` session seems to be returned on `stdout`.\r\n\r\nI'm running a script via `heroku run` as part of a workflow, and I've hit a snag since the script I'm running outputs to `stderr` too, and I want to ignore that output.\r\n\r\nSimple test case (e.g. `script.sh`):\r\n\r\n```sh\r\n#!/bin/bash\r\n\r\n# via: http://stackoverflow.com/questions/2990414/echo-that-outputs-to-stderr\r\nerro() { echo \"$@\" 1>&2; }\r\nerro 'This is error output.'\r\n```\r\n\r\nWorks locally:\r\n\r\n```\r\n$ ./script.sh\r\nThis is error output.\r\n\r\n$ ./script.sh 2> /dev/null\r\n(no output)\r\n```\r\n\r\nDoesn't work via `heroku run`:\r\n\r\n```\r\n$ heroku run ./script.sh 2> /dev/null\r\nRunning `bash` attached to terminal... up, run.6258\r\nThis is error output.\r\n```"},"comment":{"url":"https://api.github.com/repos/heroku/heroku/issues/comments/71872158","html_url":"https://github.com/heroku/heroku/issues/1214#issuecomment-71872158","issue_url":"https://api.github.com/repos/heroku/heroku/issues/1214","id":71872158,"user":{"login":"scottwb","id":91148,"avatar_url":"https://avatars.githubusercontent.com/u/91148?v=3","gravatar_id":"","url":"https://api.github.com/users/scottwb","html_url":"https://github.com/scottwb","followers_url":"https://api.github.com/users/scottwb/followers","following_url":"https://api.github.com/users/scottwb/following{/other_user}","gists_url":"https://api.github.com/users/scottwb/gists{/gist_id}","starred_url":"https://api.github.com/users/scottwb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottwb/subscriptions","organizations_url":"https://api.github.com/users/scottwb/orgs","repos_url":"https://api.github.com/users/scottwb/repos","events_url":"https://api.github.com/users/scottwb/events{/privacy}","received_events_url":"https://api.github.com/users/scottwb/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T17:01:12Z","updated_at":"2015-01-28T17:01:12Z","body":"I love to see this fixed as well. My use case: a `heroku run \"rake report\" > report.csv` task that prints errors to stderr and CSV data to stdout. I want my CSV file to just have CSV data, and I want to see errors in the console. Works great locally, just not through `heroku run`."}}