to do as well as possible under conditions that are not satisfactory.
The only way to survive being jailed is to make the best of a bad situation.
make the best of a bad situation
To deal with and create the best possible outcome of a bad, unfortunate, or unpleasant situation or set of circumstances. I know this data entry job isn't what you wanted for a career, but for the time being try and make the best of a bad situation.We weren't expecting to have to share our timeshare with others, but there's nothing we can do about it now, so we'd better make the best of a bad situation.