Bug - Fixed login CLI command will prevent logout if not previously logged in

Bale

Minion
This is weird, but easy to reproduce. Create a txt file (we'll call it error.txt) in /scripts with the following line:

Code:
login Bale

Your character name can vary, but it must be a character whose password has been remembered by KoLmafia.

Now, start KoLmafia, but do not login. Then select error.txt from the scripts menu. As you would expect it will login your character without any difficulty. Yay! As far as I have discovered, everything will work perfectly until you want to logout. You cannot.

Mafia will refuse the "logout" CLI command. It will also refuse to logout if you select "File -> Logout of KoL". If you try to exit KoLmafia in any other way it will work, but it will not execute your logoutScript so something is obviously not working on exit.

The interesting thing is that the login command can be used to switch characters if you are already logged in. When you do that it will allow you to logout any way you like, just as normal. The bug only occurs if you use the login command before logging in as a character.
 
Last edited:

Catch-22

Active member
Did this only recently start happening? I've used KoLmafia in CLI mode a lot in the past and it's common for me to do things very similar to how you're describing, but I haven't experienced this issue before. I will see if I can reproduce it later.

Edit: I tried and it looks like it's broken, but it wasn't always broken because I did what I always used to do when I was running in CLI mode.
 
Last edited:

Bale

Minion
it wasn't always broken because I did what I always used to do when I was running in CLI mode.

I am also aware that wasn't always broken, but I first noticed the problem about half a year ago. It took a while before I figured out the condition for replicating the problem. Then it took even longer before I bothered to make a bug report for something I only rarely do when it isn't Crimbo season. I might have taken even longer to report it if Alhifar wasn't noticing the issue.
 
Last edited:

Bale

Minion
Thanks to you for inspiring me to finally report this. I was thinking I was the only one who it affected since in the last half year since I first noticed it, nobody else mentioned a problem.
 
Top