aboutsummaryrefslogtreecommitdiff
path: root/scripts/docker.bash
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/docker.bash')
-rwxr-xr-xscripts/docker.bash9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/docker.bash b/scripts/docker.bash
index d846122..812cded 100755
--- a/scripts/docker.bash
+++ b/scripts/docker.bash
@@ -22,4 +22,11 @@ docker build . -t "apheleia:$tag" \
--build-arg "UID=$UID" \
--build-arg "VERSION=$tag"
-docker run -it --rm -v "$PWD:/home/docker/src" "apheleia:$tag" "${args[@]}"
+it=()
+
+if [[ -t 0 ]]; then
+ it+=(-it)
+fi
+
+docker run "${it[@]}" --rm -v "$PWD:/home/docker/src" \
+ "apheleia:$tag" "${args[@]}"