Avoid using a tty in the packer script unless it exists
This commit is contained in:
parent
4fe5c13fba
commit
3588d52f70
|
@ -1,6 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec docker run --rm -ti \
|
||||
tty --quiet
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
TTY_ARGS="-ti"
|
||||
fi;
|
||||
|
||||
exec docker run --rm ${TTY_ARGS} \
|
||||
-v $PWD:$PWD \
|
||||
-w $PWD \
|
||||
hashicorp/packer:light $@
|
||||
|
|
Loading…
Reference in New Issue