Skip to content

Commit

Permalink
remove local .openshiftconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Apr 21, 2015
1 parent c4eb472 commit e03e4cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 1 addition & 8 deletions hack/test-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,9 @@ osc get services --config="${CERT_DIR}/admin/.kubeconfig"
# test config files from env vars
OPENSHIFTCONFIG="${CERT_DIR}/admin/.kubeconfig" osc get services

# test config files in the current directory
TEMP_PWD=`pwd`
pushd ${CONFIG_DIR} >/dev/null
cp ${CERT_DIR}/admin/.kubeconfig .openshiftconfig
${TEMP_PWD}/${GO_OUT}/osc get services
popd

# test config files in the home directory
mkdir -p ${HOME}/.config/openshift
mv ${CONFIG_DIR}/.openshiftconfig ${HOME}/.config/openshift/config
mv ${CERT_DIR}/admin/.kubeconfig ${HOME}/.config/openshift/config
osc get services
mv ${HOME}/.config/openshift/config ${HOME}/.config/openshift/non-default-config
echo "config files: ok"
Expand Down
3 changes: 1 addition & 2 deletions pkg/cmd/cli/config/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
const (
OpenShiftConfigPathEnvVar = "OPENSHIFTCONFIG"
OpenShiftConfigFlagName = "config"
OpenShiftConfigFileName = ".openshiftconfig"
OpenShiftConfigHomeDir = ".config/openshift"
OpenShiftConfigHomeFileName = "config"
OpenShiftConfigHomeDirFileName = OpenShiftConfigHomeDir + "/" + OpenShiftConfigHomeFileName
Expand All @@ -24,7 +23,7 @@ var RecommendedHomeFile = path.Join(os.Getenv("HOME"), OpenShiftConfigHomeDirFil
// 1. --config value
// 2. if OPENSHIFTCONFIG env var has a value, use it. Otherwise, ~/.config/openshift/config file
func NewOpenShiftClientConfigLoadingRules() *clientcmd.ClientConfigLoadingRules {
chain := []string{OpenShiftConfigFileName}
chain := []string{}
migrationRules := map[string]string{}

envVarFile := os.Getenv(OpenShiftConfigPathEnvVar)
Expand Down

0 comments on commit e03e4cd

Please sign in to comment.