preaction / Statocles

Static website CMS
http://preaction.me/statocles
Other
84 stars 33 forks source link

Fix some problems on Windows and when RE metacharacters in path #557

Closed mohawk2 closed 6 years ago

mohawk2 commented 6 years ago

The lib/Statocles/Util.pm change is so that it can handle when there are single entities in eg $^X that have spaces, instead of just doing a split on whitespace. To do it truly truly properly would probably require Text::ParseWords and I didn't want to add a dep.

preaction commented 6 years ago

Looks good to me. There's some test failures in Travis, but I'm going to fix them by removing the different options for die from the run_editor subroutine, making there only be one exception: Editor exited with non-zero status: $?.

djerius commented 6 years ago

Text::ParseWords has been in core for a while:

% corelist Text::ParseWords

Data for 2018-02-20
Text::ParseWords was first released with perl 5
mohawk2 commented 5 years ago

@djerius Long after, I've looked at this again and you're right of course! However, I don't want to change this code since $ENV{EDITOR} is inherently a string rather than an array thing, so this change needs to more or less stand as-is.

If it's any consolation, I remembered your advice when I made https://github.com/PDLPorters/extutils-f77/pull/1, as you might have inferred when you saw it (and kindly commented)!

djerius commented 5 years ago

I am consoled!