Skip to content

Commit 85959b0

Browse files
committed
oops, need the tty it handling stuff
1 parent c188dca commit 85959b0

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

in-docker.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
#!/usr/bin/env bash
2-
set -e
1+
#!/usr/bin/env fish
2+
# local fish version at time of writing was 4.0.2
3+
4+
set fish_trace 1
5+
6+
cd (dirname (status --current-filename))
7+
8+
set -l rm_and_tty_arg '--rm'
9+
if isatty 0 # stdin
10+
set -a rm_and_tty_arg '-it'
11+
end
312

413
mkdir -p node_modules/.docker
5-
docker run --rm -it \
14+
docker run $rm_and_tty_arg \
615
-v "$PWD:/hex-engine" \
716
-v "$PWD/node_modules/.docker:/hex-engine/node_modules" \
817
suchipi/node-nw-env:0.7.0 \
918
bash -c \
10-
"Xvfb -screen 0 1024x768x16 -ac & source /usr/local/nvm/nvm.sh && cd /hex-engine && nvm install && nvm use && $*"
19+
"Xvfb -screen 0 1024x768x16 -ac & source /usr/local/nvm/nvm.sh && cd /hex-engine && nvm install && nvm use && $argv"

0 commit comments

Comments
 (0)