use tty cmd to detect if we have one. closes #921
This commit is contained in:
1 parent
013eafd8df
commit
4ad0c3022e
1 file changed
+2
-2
@@ -49,8 +49,8 @@ case "$1" in
|
|||||||
shift 2
|
shift 2
|
||||||
|
|
||||||
DOCKER_ARGS=$(: | pluginhook docker-args $APP run)
|
DOCKER_ARGS=$(: | pluginhook docker-args $APP run)
|
||||||
# if we have a prompt, then we have a tty according to the LDP (http://www.tldp.org/LDP/abs/html/intandnonint.html)
|
[[ "$(/usr/bin/tty || true)" != "not a tty" ]] && DOKKU_RUN_OPTS="-i -t"
|
||||||
[[ ! -z "$PS1" ]] && DOKKU_RUN_OPTS="-i -t"
|
|
||||||
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE /exec "$@"
|
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE /exec "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user