Error reading /Applications/Xcode. The file doesn’t exist
It's not a bug. It's how the command line works. If you want to copy a file, you use cp /path/file /path/copy. You use spaces to signal a new argument. If you have spaces in your path, you must tell bash to ignore them: cp /path\ with\ spaces/file /path/copy. 

If you use brew, they have a notice on their website that says that Xcode must not have spaces in the name, otherwise the Xcode command line tools won't work properly. (Brew link: https://github.com/Homebrew/legacy-homebrew/issues/38049 )