Ensure the provider is supported and exit otherwise.

pull/6/head
Madhusudan.C.S 2016-08-03 19:41:40 -07:00
parent 1c8b418383
commit 7f20effd92
1 changed files with 6 additions and 0 deletions

View File

@ -133,6 +133,12 @@ function pull_installer() {
}
function ensure_files() {
kube::log::status "Ensure provider is supported..."
if [[ "${KUBERNETES_PROVIDER:-}" != "gce" ]]; then
echo "Supported providers: \"gce\""
exit 1
fi
kube::log::status "Ensure credential files exist..."
if [[ ! -f "${GOOGLE_APPLICATION_CREDENTIALS}" ]]; then
echo "Please ensure Google credentials file \""${GOOGLE_APPLICATION_CREDENTIALS}"\" exists."