From cbee8c6e930aa2f661847b9a0603864d688fb956 Mon Sep 17 00:00:00 2001 From: Daniel Serodio Date: Tue, 9 May 2023 19:02:16 -0300 Subject: [PATCH] Fix warning on kubectl-ssh When I run kubectl-ssh I get the following warning: ``` kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. ``` This commit fixes this warning --- kubectl-ssh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubectl-ssh b/kubectl-ssh index 70161af..aaf6f8f 100755 --- a/kubectl-ssh +++ b/kubectl-ssh @@ -70,9 +70,9 @@ ssh_pod() { echo "Pod name must be specified." exit 1 fi - kubectl exec -it "$@" bash || ( + kubectl exec -it "$@" -- bash || ( echo "Running bash in pod failed; trying with sh" - kubectl exec -it "$@" sh + kubectl exec -it "$@" -- sh ) }