mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #922 from progrium/921-mh-use-tty-to-detect-tty
use tty cmd to detect if we have one. closes #921
This commit is contained in:
@@ -49,8 +49,8 @@ case "$1" in
|
||||
shift 2
|
||||
|
||||
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)
|
||||
[[ ! -z "$PS1" ]] && DOKKU_RUN_OPTS="-i -t"
|
||||
[[ "$(/usr/bin/tty || true)" != "not a tty" ]] && DOKKU_RUN_OPTS="-i -t"
|
||||
|
||||
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE /exec "$@"
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user