susestudio / helphelp

Help generator
MIT License
1 stars 0 forks source link

The tool doesn't work properly if the input/output directory name contains spaces #8

Open dmajda opened 11 years ago

dmajda commented 11 years ago

If I run helphelp with an input directory argument containing spaces, it will report lot of errors like this:

Resize picture: mogrify -resize 600x5000 out/quickstart/studio-qs-addrepo-import.png
mogrify: unable to open image `out/quickstart/studio-qs-addrepo-import.png': No such file or directory @ error/blob.c/OpenBlob/2588.
mogrify: unable to open file `out/quickstart/studio-qs-addrepo-import.png' @ error/png.c/ReadPNGImage/3639.
cp: target `out/quickstart/studio-qs-addrepo-overview.png' is not a directory

Similarly for the output directory. When the directories don't contain spaces, everything works fine.

The reason is obviously lack of escaping in shell calls.

@bear454: Would you accept a pull request that will resolve this by using Ruby methods (from FileUtils, etc.) instead of shell calls where possible, and using Cheetah in places where they can't be avoided?

bear454 commented 11 years ago

Yeah, no problem. Although, long term, Jekyll is probably a better solution than our own.