Skip to content

Commit

Permalink
Update util.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
erictune committed Feb 11, 2015
1 parent 549504d commit c348b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function detect-master () {
# KUBE_PASSWORD
function get-password {
# go template to extract the auth-path of the current-context user
local template='{{with $ctx := index . "current-context"}}{{$user := index . "contexts" $ctx "user"}}{{index . "users" $user "auth-path"}}{{end}'
local template='{{with $ctx := index . "current-context"}}{{$user := index . "contexts" $ctx "user"}}{{index . "users" $user "auth-path"}}{{end}}'
local file=$("${KUBE_ROOT}/cluster/kubectl.sh" config view -o template --template="${template}")
if [[ ! -z "$file" && -r "$file" ]]; then
KUBE_USER=$(cat "$file" | python -c 'import json,sys;print json.load(sys.stdin)["User"]')
Expand Down

0 comments on commit c348b30

Please sign in to comment.