France is there to get cheap Libyan oil from a warlord.
I will need more convincing on that. But I do see that France’s involment does have pretty bad optics - and maybe reasons. But because France is not the only one there, it sure isn’t something black and white.
And I wouldn’t draw comparisons to Ukraine as the Libya has unfortunately have had so much internal instability that is not comparable - though one could say something Euromaiden and the aftermath of it but that is still order of magnitudes different starting point.
There is currently a trial for former French president Sarkozy for having been bankrolled by the Gaddafi regime.
France then was the first country to bomb Libya in 2011. France is heavily influencing what is going on in Libya.