mirror of
https://github.com/CHN-beta/hpcstat.git
synced 2026-01-11 02:09:24 +08:00
增加一点提示
This commit is contained in:
@@ -171,10 +171,15 @@ int main(int argc, const char** argv)
|
|||||||
initdb();
|
initdb();
|
||||||
else if (args[1] == "login")
|
else if (args[1] == "login")
|
||||||
{
|
{
|
||||||
|
std::cout << "Checking your ssh certification..." << std::flush;
|
||||||
if (auto key = authenticated(); !key) return 1;
|
if (auto key = authenticated(); !key) return 1;
|
||||||
else if (auto session = session_id(); !session) return 1;
|
else if (auto session = session_id(); !session) return 1;
|
||||||
else writedb(LoginData
|
else
|
||||||
{.Key = key->first, .SessionId = *session, .Subaccount = subaccount(), .Interactive = interactive()});
|
{
|
||||||
|
writedb(LoginData
|
||||||
|
{.Key = key->first, .SessionId = *session, .Subaccount = subaccount(), .Interactive = interactive()});
|
||||||
|
std::cout << fmt::format("\33[2K\rLogged in as {}.\n", key->second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (args[1] == "logout")
|
else if (args[1] == "logout")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user