Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

stdin/stdout don't behave like UNIX with heroku run #256

Closed
ddollar opened this issue Mar 14, 2012 · 14 comments
Closed

stdin/stdout don't behave like UNIX with heroku run #256

ddollar opened this issue Mar 14, 2012 · 14 comments
Labels

Comments

@ddollar
Copy link
Contributor

ddollar commented Mar 14, 2012

Trying to run this command

cat /tmp/test.md | heroku run -a dx-dashboard "curl -s -F page=@- http://mantastic.herokuapp.com"

The pipes should all get hooked up correctly in a non-interactive mode to let stdin/stdout work properly with the shell container of heroku run.

Let me know if this doesn't make sense and I can try to elaborate.

@ddollar
Copy link
Contributor Author

ddollar commented Mar 14, 2012

/cc @ryandotsmith

@kennethreitz
Copy link

+100

@kennethreitz
Copy link

We could detect if stdin is a tty and suppress the "attaching process to app" message when piping things around as well

@ejfinneran
Copy link

+1

@will
Copy link
Contributor

will commented Dec 15, 2012

For what it's wroth, pipes work with pg:psql

@felixyz
Copy link

felixyz commented Dec 28, 2012

@ddollar
I suppose I've run into the same problem. I wanted to pipe a list from a file over to my app on Heroku to populate the db. I do NOT want to check the list into git.

cat my_list | heroku run rake blabla:seed

This just outputs my list but the data never reaches my rake task (which is checking STDIN).

In my rake task, I specifically check that STDIN is not tty (I only want to check for piped input). Not sure how that relates to what @kennethreitz is saying above.

Any and all suggestions would be appreciated.

@wuputah
Copy link
Contributor

wuputah commented Jan 2, 2013

echo echo echo | heroku run bash is an easy failing test case for this. Even though the TTY is disconnected, the connection / bash acts as if it does, leading to weird behavior. I think the problem may lie in the rendezvous protocol which doesn't transmit this information and therefore it cannot run the process in the right way.

(But I also don't know much about TTYs.)

@kgilpin
Copy link

kgilpin commented Mar 21, 2013

+1 wish stdin could pipe to heroku run

@admin-ns
Copy link

For some types of operations, e.g., loading data or fixtures into a site, the alternatives to stdin are pretty lame: I either have to upload the data to a public file server and write my import utility to access that (thank goodness for python requests library ;) ) , or I have to commit the file to my repository temporarily, push, remove, commit. For some types of regular operations I'd like to do, neither of these is a very viable option.

@amacneil
Copy link

👍

@mikehale
Copy link
Contributor

bump 👍

@roberts81
Copy link

👍 👍

@wuputah
Copy link
Contributor

wuputah commented Jun 27, 2013

Merged #811.

@wuputah wuputah closed this as completed Jun 27, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests