This function looks like it "might" solve the problem we have with spaces in repo names! worth a check.