Say I have a map between pullback squares $(Y \rightarrow Z \leftarrow X) \to (Y' \rightarrow Z' \leftarrow X')$. If the maps $X \to X'$, $Y \to Y'$ and $Z \to Z'$ are homotopy equivalences, does it follow that the induced map $X \times_Z Y \to X' \times_{Z'} Y'$ between the pullbacks is also a homotopy equivalence? If not, what additional conditions (e.g., insisting that $X \to Z$ is a fibration, $Y' \to Z'$ is a cofibration, everything is a CW complex, etc.) are needed?
I'll also like to know the answer in the case of pushout squares, but I guess I can just dualize whatever the answer to the previous question turns out to be.
I tried to construct an inverse map directly using the homotopy inverses $X' \to X$, $Y' \to Y$, and $Z' \to Z$, but I could not guarantee that the resulting diagram commutes enough to produce a map $X' \times_{Z'} Y' \to X \times_Z Y$. Even then, I'm not certain that I can somehow glue the homotopies in a compatible way to prove that the constructed map is a homotopy inverse.