Skip to content

Commit 7392e7b

Browse files
committed
Minor Improvement auth System
1 parent f23c039 commit 7392e7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Gdrive_Command.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,15 @@ function auth($_, $assoc)
9090
WP_CLI_Helper::pl_wait_start();
9191
$auth = WP_CLI_Google_Drive::auth();
9292
if ($auth['status'] === true and ! isset($assoc['force'])) {
93+
// Check User Token in GDrive
9394
$user_info = WP_CLI_Google_Drive::get_user_info_by_access_token($auth['access_token']);
95+
WP_CLI_Helper::pl_wait_end();
9496
if ( ! isset($user_info['error'])) {
95-
WP_CLI_Helper::pl_wait_end();
9697
WP_CLI::line("Name: " . $user_info['name']);
9798
WP_CLI::line("Email: " . $user_info['email']);
9899
WP_CLI::line("Locale: " . $user_info['locale']);
100+
exit;
99101
}
100-
exit;
101102
}
102103

103104
//Define STDIN

0 commit comments

Comments
 (0)