I have a web app written in Go and deployed on Heroku. Recently, I've implemented a new feature that needs to run a bash script file and retrieve its output. The command I'm using is:
out, err := exec.Command("bash", script_path, arg).Output()
Where script_path is the absolute path to the script. (which is built dynamically by using the caller filepath) And arg is an input to the script.
This command works fine in my local machine but not in Heroku:
18:51:40 http: panic serving 10.238.8.204:17763: exit status 127
ps: If I run the same command on "heroku run bash", it works.
Any thoughts?