Can I exit Schengen from France on a Spain-issued single-entry visa?

Hey everyone, I have a single-entry Schengen visa issued by Spain for 15 days. I plan to enter Spain, and visit France during my trip, and then fly back to my home country from France while my visa is still valid. Will I face any issues entering or exiting the Schengen Zone from France instead of Spain? Has anyone done this before? Thanks