Commit Graph

7 Commits

Author SHA1 Message Date
Ryan C. Thompson
9be99cc3db Warn for build commands that rely on whitespace-splitting
El-get-build allows a command to be specified as a single string. It
will split that string on whitespace into a list of strings, and each
element of that list will eventually be shell-quoted (by
`el-get-start-process-list`). This is wrong behavior that can easily
cause an innocent command to be over-escaped or split into too many
arguments, or both. For example, consider a build process that
involves running the following command:

    make SOME_OPTION="this is the option value"

Written as a string in Elisp, that would be:

    "make SOME_OPTION=\"this is the option value\""

After splitting on whitespace and then shell-quoting and then passing
the result to the shell, the above command is equivalent to running
the following at the shell:

    "make" "SOME_OPTION=\"this" "is" "the" "option" "value\""

See the problem? What was once a single argument is now five, and the
quotation marks have been inappropriately quoted. For this reason, I
think auto-whitespace splitting should probably be deprecated. The
command should either be a single string, which would be interpreted
as a command to be run with no arguments, or a list of strings, like
this:

    '("make" "SOME_OPTION=\"this is the option value\"")
2011-10-06 02:31:36 -07:00
Ryan C. Thompson
3fa180a61f Use a list of arguments instead of a single string for command
The `el-get-install-or-init-info` composed a command as a single
pre-quoted string using `concat` and `shell-quote-argument`. It is
better to make the command a list of unquoted arguments, which is what
this commit does.
2011-10-06 02:06:29 -07:00
Ryan C. Thompson
11ef806adc Don't call shell-quote-argument in el-get-build
Also, use slightly more robust type checking on the command.
2011-10-05 14:40:14 -07:00
Dimitri Fontaine
3d2f4c5e63 Fix el-get-install-or-init-info, per #418. 2011-10-03 22:06:40 +02:00
Dimitri Fontaine
7c84e5f61d Fix arguments not properly quoted when building install-info command line, per #408. 2011-09-30 20:54:06 +02:00
Dimitri Fontaine
8db0c4d49b Fix the refactoring so that it actually works.
This includes teaching methods that they now work with a symbolp PACKAGE,
some more cleaning up, and some load-path adjustments now that a part of the
code is in a subdirectory (methods).

Also include some of the tests used to convince oneself that the refactoring
didn't break any and all use cases for el-get, with some rough documentation
about how to use them.
2011-09-22 21:48:11 +02:00
Dimitri Fontaine
0433ca0ce9 Refactoring it all: a beginning. No time for testing yet, just showing ideas. 2011-09-20 15:15:52 +02:00