Describe the bug
Running prisma CLI command like "prisma deploy", always return "0" as exit code.

To Reproduce
prisma deploy --force and check we get Could not connect to server at...echo $?... it is 0 instead of >=1Expected behavior
Returned exitCode should be >=1
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
Ubuntu 16.04prisma CLI: prisma/1.15.3 (linux-x64) node-v8.11.41.15Additional context
This bug prevent running script like:
set -eux
docker-compose up --detach
timeout --preserve-status 5s sh -c 'until prisma deploy --force; do sleep 1; done'
I am unable to reproduce this one. @brikou Can you please share a sample project (datamodel + prisma.yml) where this is happening? Hooks or something else might be causing this.
Here are the logs from my console.
divyendusingh [prisma-3045]$ prisma deploy
â–¸ Could not connect to server at http://localhost:4467. Please check if your server is running.
Get in touch if you need help: https://www.prisma.io/forum/
To get more detailed output, run $ export DEBUG="*"
divyendusingh [prisma-3045]$ echo $?
1
divyendusingh [prisma-3045]$ prisma deploy --force
â–¸ Could not connect to server at http://localhost:4467. Please check if your server is running.
Get in touch if you need help: https://www.prisma.io/forum/
To get more detailed output, run $ export DEBUG="*"
divyendusingh [prisma-3045]$ echo $?
1
divyendusingh [prisma-3045]$ prisma --version
prisma/1.17.0-beta.24 (darwin-x64) node-v10.4.0
You can close the issue as I cannot reproduce it (I get the right 1 status code). I'll reopen with more reproduction steps if encounter again this. Thanks @divyenduz
I am facing the same issue using different prisma versions (included latest). I am running Prisma inside a docker container.
root@09848c2dd1b4:/app# prisma deploy; echo $?
â–¸ Could not connect to server at http://prisma:4466.
â–¸ Please check if your server is running.
Get in touch if you need help: https://www.prisma.io/forum/
To get more detailed output, run $ export DEBUG="*"
0
root@09848c2dd1b4:/app#
It could be an issue redirecting the error code to the client after writing the message "Get in touch if you need help: https://www.prisma.io/forum/ To get more detailed output, run $ export DEBUG="*"
FYI @divyenduz @brikou