cli
cli copied to clipboard
heroku container:push --recursive: improve error message
What is the current behavior?
$ heroku version
heroku/7.35.1 darwin-x64 node-v12.13.0
$ git clone https://github.com/heroku/alpinehelloworld.git
$ cd alpinehelloworld
$ heroku container:push web worker --recursive -a <app-name>
▸ Cannot read property 'length' of undefined
Error happens around here:
▸ Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at Function.Sanbashi.chooseJobs (/usr/local/Cellar/heroku/7.22.7/lib/client/7.35.1/node_modules/@heroku-cli/plugin-container-registry-v5/lib/sanbashi.js:59:15)
at push (/usr/local/Cellar/heroku/7.22.7/lib/client/7.35.1/node_modules/@heroku-cli/plugin-container-registry-v5/commands/push.js:71:27)
Creating the 2 Dockerfile
for the web
and worker
processes works as expected:
$ cp Dockerfile Dockerfile.web
$ cp Dockerfile Dockerfile.worker
$ heroku container:push web worker --recursive -a <app-name>
...
Your images have been successfully pushed. You can now release them with the 'container:release' command.
What is the expected behavior?
The error message should say something like:
Dockerfile.web and Dockerfile.worker not found.
Still facing this in 2022 ^^
Looks like the error is thrown from this line