shime
shime

Reputation: 9018

sending a command to heroku console

What's the correct way of sending a command to heroku console on Cedar?

heroku console 2+2 works on older stacks - it warns me to use heroku run console on cedar.

When I run

heroku run console 2+2

it loads the unwanted "2+2" environment and opens up a console.

Loading 2+2 environment (Rails 3.2.3)
irb(main):001:0> 

So what's the proper way of sending a command to heroku console on Cedar?

Upvotes: 0

Views: 1125

Answers (1)

Gazler
Gazler

Reputation: 84180

It's not the prettiest solution, but piping the command in did work.

echo "2 + 2" | heroku run console

Looking at the code, it appears there is no (current) built in way to do it.

Upvotes: 1

Related Questions