Skip to content

Commit

Permalink
Use [ -t 0 ] for terminal toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
kvaps committed Jul 13, 2021
1 parent cbf662c commit a64ce23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kubectl-node_shell
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
set -e

kubectl=kubectl
version=1.5.1
version=1.5.2
generator=""
node=""
nodefaultctx=0
nodefaultns=0
cmd='[ "nsenter", "--target", "1", "--mount", "--uts", "--ipc", "--net", "--pid", "--"'
if ! [ -p /dev/stdin ] && ! [ -p /dev/stdout ]; then
if [ -t 0 ]; then
tty=true
else
tty=false
Expand Down

0 comments on commit a64ce23

Please sign in to comment.