platformsh / cli

The unified tool for managing your Platform.sh services from the command line.
https://docs.platform.sh/administration/cli.html
MIT License
16 stars 6 forks source link

`platform login` when already logged in #191

Open cs278 opened 4 days ago

cs278 commented 4 days ago

I'd be useful if the login command supported someway of telling it to do nothing if I'm already logged in, I want to call it at the start of scripts that talk to Platform to ensure the user is logged in but it doesn't need to ask them if they want to login again. I've tried platform login --{no-interaction,no,yes} but these tell the command doesn't work non interactively. platform login --quiet doesn't work either as it just silently does nothing.

Could some other argument like --if-already-logged-in-dont-nag-the-user be added to turn off the "you're already logged in prompt"?

akalipetis commented 4 days ago

Hey, thanks for sharing your use case, we'll take this with the team and get back here with potential solutions or a fix.