openshift-online/ocm-cli

inconsistent behaviour of "ocm cluster login" w.r.t. the --token flag

Opened this issue · 0 comments

AFAICT, ocm cluster login:

  • without --token, prompts for a username and password and logs oc in
  • with --token, just opens a page in the browser and exits 0

This makes it hard to incorporate ocm cluster login in a shell script.

Instead, with --token the tool should prompt for a username (or take it from --username) and after (optionally) displaying the page, prompt for the token, and then execute oc with it to log in.