File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
packages/contentstack-auth Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1818 "CLI_AUTH_LOGOUT_DESCRIPTION" : " User session logout" ,
1919 "CLI_AUTH_LOGOUT_FLAG_FORCE" : " Force logging out for skipping the confirmation" ,
2020 "CLI_AUTH_LOGOUT_ALREADY" : " You're already logged out" ,
21+ "CLI_AUTH_LOGOUT_CANCELLED" : " Log out cancelled" ,
2122 "CLI_AUTH_LOGOUT_NO_AUTHORIZATIONS" : " No authorizations found" ,
2223 "CLI_AUTH_LOGOUT_NO_AUTHORIZATIONS_USER" : " No authorizations found for current user" ,
2324 "CLI_AUTH_WHOAMI_LOGGED_IN_AS" : " You are currently logged in with email:" ,
Original file line number Diff line number Diff line change @@ -93,7 +93,10 @@ export default class LogoutCommand extends BaseCommand<typeof LogoutCommand> {
9393 confirm,
9494 isAuthenticated : oauthHandler . isAuthenticated ( ) ,
9595 } ) ;
96- log . success ( messageHandler . parse ( 'CLI_AUTH_LOGOUT_ALREADY' ) , this . contextDetails ) ;
96+ const messageKey = confirm === false && oauthHandler . isAuthenticated ( )
97+ ? 'CLI_AUTH_LOGOUT_CANCELLED'
98+ : 'CLI_AUTH_LOGOUT_ALREADY' ;
99+ log . success ( messageHandler . parse ( messageKey ) , this . contextDetails ) ;
97100 }
98101 } catch ( error ) {
99102 log . debug ( 'Logout failed.' , { ...this . contextDetails , error : error . message } ) ;
You can’t perform that action at this time.
0 commit comments