holman / dotfiles

@holman does dotfiles
http://zachholman.com/2010/08/dotfiles-are-meant-to-be-forked/
MIT License
7.24k stars 3.35k forks source link

Correctly handle spaces in file paths #334

Open wdn opened 3 years ago

wdn commented 3 years ago

Since install_dotfiles() in bootstrap treats the output of find as a list rather than an array, paths with spaces in them will break. The simplest solution is to change the Internal Field Separator to a newline, as it is extremely unlikely that any filenames will contain that character.

Alternatively, the result of find could be put into an array, as demonstrated by this answer, but this seems like a reasonable fix for the vast majority of cases.