This command:

  lsb_release -cs
Doesn't work for Linux Mint 22.2

What you want is UBUNTU_CODENAME from /etc/os-release (in the case of Linux Mint 22.2, it's "noble")

EDIT: Actually, I'm not even sure you can do $(command) inside /etc/apt/sources.list.d/*

Try again. I don't have mint instance to test, but should work now.

I had already fixed the sources file manually, but the "any" distro should probably work as well (I put "noble" when I did the manual edit).

Thanks though for the fix.