#Hello

1 messages ยท Page 1 of 1 (latest)

cyan spoke
#

If the user is already logged in to <orgname> you can tell with CLI, but not an equiv if NOT logged in.

$ dagger login <orgname>
Success.

$ echo $?
0

If not logged in, the CLI will block and you'll do auth in a web browser.

...but, you could look for the file that gets created at login
~/.config/dagger/credentials.json which has an "expiry" field with a timestamp you could check.

that file will be absent if the user has logged out via dagger logout

You can also see the org they are logged in to (or last logged in to) at ~/.config/dagger/org

#

If you'd like something else, like a dagger login --status or --check, please open an issue ๐Ÿ™ ๐Ÿ™‚

soft canyon
#

...but, you could look for the file that gets created at login
~/.config/dagger/credentials.json which has an "expiry" field with a timestamp you could check.

Ok. I think it will be easy enough to check this

If you'd like something else, like a dagger login --status or --check, please open an issue
Will do. I think it should be easy to implement and useful for scenarios like mine ๐Ÿ™‚

cyan spoke
#

cc @low saffron

soft canyon
low saffron
# cyan spoke cc <@336241811179962368>

SGTM just replied in the issue just to make sure if by any chance there's already an existing common pattern for things like this. Otherwise, adding a flag seems like a reasonable option