You use fair-weather to refer to someone who offers help to someone, or who takes part in a particular activity, only when it is easy or pleasant for them to do so.
[disapproval]
...a fair-weather friend.
fair-weather in British English
adjective
1.
suitable for use in fair weather only
2.
not reliable or present in situations of hardship or difficulty (esp in the phrase fair-weather friend)
fair-weather in American English
(ˈfɛrˈwɛðər)
adjective
1.
suitable only for fair weather
2.
helpful, dependable, etc. only in agreeable, easy circumstances
fair-weather friends
Examples of 'fair-weather' in a sentence
fair-weather
Overhead puffy fragments of fair-weather cumulus drifted across the darkening evening sky.
Tapply, William G FOLLOW THE SHARKS (2000)
A fair-weather wind, of gale force, indeed, of hurricane force.