forked from rook/rook
Command arguments are passed to the kernel as a vector, so joining them with plain spaces loses the boundaries between them. An argument holding whitespace or a shell metacharacter reads back as several arguments, or as several commands. FormatCommand renders a command and its arguments as a single line a POSIX shell reads back as the original vector. Quoting is minimal: an argument is single-quoted only when it contains a character the shell would not pass through literally, so the flag-heavy command lines rook builds stay readable. Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>