diff --git a/.changes/next-release/bugfix-1507b9a1-02ba-426c-b08d-e8ac8ca1e83d.json b/.changes/next-release/bugfix-1507b9a1-02ba-426c-b08d-e8ac8ca1e83d.json new file mode 100644 index 0000000000..939e34ca0f --- /dev/null +++ b/.changes/next-release/bugfix-1507b9a1-02ba-426c-b08d-e8ac8ca1e83d.json @@ -0,0 +1,4 @@ +{ + "type" : "bugfix", + "description" : " Chosing cancel on sign out confirmation now cancels the sign out and does not delete profiles from ~/.aws/config ([#5167](https://github.com/aws/aws-toolkit-jetbrains/issues/5167))" +} diff --git a/plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/credentials/actions/SsoLogoutAction.kt b/plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/credentials/actions/SsoLogoutAction.kt index 49eb918a14..582f84491f 100644 --- a/plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/credentials/actions/SsoLogoutAction.kt +++ b/plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/credentials/actions/SsoLogoutAction.kt @@ -23,8 +23,8 @@ class SsoLogoutAction(private val value: AwsBearerTokenConnection) : DumbAwareAc AwsCoreBundle.message("gettingstarted.auth.idc.sign.out.confirmation.title"), AwsCoreBundle.message("gettingstarted.auth.idc.sign.out.confirmation") ).yesText(AwsCoreBundle.message("general.confirm")).ask(e.project) - if (confirmDeletion) { - deleteSsoConnection(value) + if (!confirmDeletion) { + return } } logoutFromSsoConnection(e.project, value)