Enable shellcheck and fix issues (#170)

This commit is contained in:
ferhat elmas
2019-08-25 21:05:01 +02:00
committed by Ahmet Alp Balkan
parent 543e035090
commit 1652420a15
2 changed files with 6 additions and 2 deletions

View File

@@ -3,7 +3,9 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq bats
- sudo curl -fsSL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.13.1/bin/linux/amd64/kubectl
- sudo chmod +x /usr/bin/kubectl
- sudo chmod +x /usr/bin/kubectl
script:
- bats test/kubectx.bats
- bats test/kubens.bats
- shellcheck kubectx
- shellcheck kubens

4
kubens
View File

@@ -66,7 +66,9 @@ escape_context_name() {
}
namespace_file() {
local ctx="$(escape_context_name "${1}")"
local ctx
ctx="$(escape_context_name "${1}")"
echo "${KUBENS_DIR}/${ctx}"
}