But the Lord was with Joseph and showed him mercy and gave him favor in the sight of the keeper of the prison.