Fair-weather friend.
Fair-weather friend.
A 'Fair-weather friend' is someone who is only around and supportive when things are going well. The metaphor suggests a friend who disappears when 'weather'—i.e., life—becomes tough, revealing a relationship that's dependable only in good circumstances, much like good weather.
A fair-weather friend won't stand by you in tough times.
A friend who only supports you during good times won't help during tough times.
He realized she was a fair-weather friend after he lost his job.
He discovered she wasn't a true friend after he faced difficulties.
Don't be a fair-weather friend; true friends stick around.
Be a loyal friend who stays around irrespective of circumstances.