Skip to content

Commit 349a637

Browse files
committed
fix: update close mechanism
1 parent c16d5b2 commit 349a637

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

internal/web/web.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,14 @@ func (web *Web) GetSSOCredentials(conf credentialexchange.CredentialConfig) (str
230230
}
231231

232232
func (web *Web) MustClose() {
233-
web.launcher.Kill()
234-
web.launcher.Cleanup()
233+
// We do not want to clean up the user directory
234+
// this ensures that the browser remembers the credentials
235+
// and anything else done during the sign up process - e.g. extension installation
236+
// web.launcher.Cleanup()
235237
// swallows errors here - until a structured logger
236238
_ = web.browser.Close()
237239
utils.Sleep(0.5)
240+
web.launcher.Kill()
238241
// remove process just in case
239242
// os.Process is cross platform safe way to remove a process
240243
if osprocess, err := os.FindProcess(web.launcher.PID()); err == nil && osprocess != nil {

0 commit comments

Comments
 (0)