azukiapp / azk

azk is a lightweight open source development environment orchestration tool. Instantly & safely run any environment on your local machine.
http://azk.io
Apache License 2.0
897 stars 63 forks source link

[cli] Sending `TERM` env if it's not set #535

Closed gullitmiranda closed 8 years ago

gullitmiranda commented 8 years ago

Send the environment variable TERM to the interactive terminal in case it has not been set.

saitodisse commented 8 years ago

Hello @gullitmiranda, When azk shell is executed interactively the TERM is set:

~/_git/azk (release/0.16.0 ✔) ᐅ azk shell --image azukiapp/azktcl:0.0.2 --shell /bin/bash -c "env"            
HOSTNAME=237cdb532b0a
AZK_MID=76dc6b71bf
AZK_ENV=azk
AZK_NAME=dev.azk.io_type.shell_mid.76dc6b71bf_sys.--tmp--_seq.1_shell.script_uid.45be43a07b
AZK_SEQ=1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/azk/azk
AZK_TYPE=shell
AZK_SYS=--tmp--
SHLVL=1
HOME=/root
AZK_SHELL=script
AZK_UID=45be43a07b
_=/usr/bin/env
~/_git/azk (release/0.16.0 ✔) ᐅ azk shell --image azukiapp/azktcl:0.0.2 --shell /bin/bash         
bash-4.2# env                                                                                                                                
HOSTNAME=4760af68edd7
TERM=xterm
AZK_MID=76dc6b71bf
AZK_ENV=azk
AZK_NAME=dev.azk.io_type.shell_mid.76dc6b71bf_sys.--tmp--_seq.1_shell.interactive_uid.6a96f1407b
AZK_SEQ=1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/azk/azk
AZK_TYPE=shell
AZK_SYS=--tmp--
SHLVL=1
HOME=/root
AZK_SHELL=interactive
AZK_UID=6a96f1407b
_=/usr/bin/env

Does my test make sense?

nuxlli commented 8 years ago

It is the exact expected behavior @saitodisse, and the same occurring in an ssh session for example.

saitodisse commented 8 years ago

LGTM