Chromium Code Reviews| Index: tools/gn/function_exec_script.cc |
| diff --git a/tools/gn/function_exec_script.cc b/tools/gn/function_exec_script.cc |
| index d5e66ae78cbceecc1fa49a2777df6c1713ac1404..4da361e82aadb25fa6f698e75c9d4cee766d85da 100644 |
| --- a/tools/gn/function_exec_script.cc |
| +++ b/tools/gn/function_exec_script.cc |
| @@ -171,8 +171,15 @@ Value RunExecScript(Scope* scope, |
| // Make the command line. |
| const base::FilePath& python_path = build_settings->python_path(); |
| base::CommandLine cmdline(python_path); |
| + |
| + // Opt out of CommandLine's parameter processing, which reformats switches |
| + // and so on. For GN, arguments should be passed on exactly like they are |
| + // in the .gn file. |
| + cmdline.AppendArg("--"); |
|
brettw
2016/02/22 22:32:45
I'm confused, won't this pass "--" to Python as we
Nico
2016/02/22 22:58:05
base/command_kind.cc filters out the first -- para
brettw
2016/02/22 23:00:35
Weird, base::CommandLine is a disaster. Can you me
|
| + |
| cmdline.AppendArgPath(script_path); |
| + |
|
brettw
2016/02/22 22:32:45
Looks like you got an extra line in here.
Nico
2016/02/22 22:58:05
Will remove
|
| if (args.size() >= 2) { |
| // Optional command-line arguments to the script. |
| const Value& script_args = args[1]; |