Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-9758 - refactor ensureLoggedIn call sites #4784

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stuqdog
Copy link
Member

@stuqdog stuqdog commented Feb 10, 2025

ensureLoggedIn has turned into a gotcha where everyone adding a new CLI command is responsible for calling it themselves or else risking trying to run actions without being logged in. This feature creates a single canonical call site when a viam client is first created (except when running a login action) so that no one has to think about this anymore!

Tested locally after logging out. For non-login actions (e.g. viam organizations list and viam module generate), being logged out resulted in an error. for viam login, the normal login process proceeded as normal.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants