fp << command->GetName() << "\n";
- fp << "\t" "command_line\t";
-
- Value commandLine = command->GetCommandLine();
-
- if (commandLine.IsObjectType<Array>()) {
- Array::Ptr args = commandLine;
-
- ObjectLock olock(args);
- String arg;
- BOOST_FOREACH(arg, args) {
- // This is obviously incorrect for non-trivial cases.
- fp << " \"" << CompatUtility::EscapeString(arg) << "\"";
- }
- } else if (!commandLine.IsEmpty()) {
- fp << CompatUtility::EscapeString(commandLine);
- } else {
- fp << "<internal>";
- }
+ fp << "\t" "command_line" "\t" << CompatUtility::GetCommandLine(command);
fp << "\n" "\t" "}" "\n"
"\n";
{
Value commandLine = command->GetCommandLine();
- String commandline;
+ String result;
if (commandLine.IsObjectType<Array>()) {
Array::Ptr args = commandLine;
String arg;
BOOST_FOREACH(arg, args) {
// This is obviously incorrect for non-trivial cases.
- commandline = " \"" + EscapeString(arg) + "\"";
+ result += " \"" + EscapeString(arg) + "\"";
}
} else if (!commandLine.IsEmpty()) {
- commandline = EscapeString(Convert::ToString(commandLine));
+ result = EscapeString(Convert::ToString(commandLine));
} else {
- commandline = "<internal>";
+ result = "<internal>";
}
- return commandline;
+ return result;
}
/* host */