Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: tools/gn/function_exec_script.cc

Issue 1721883002: gn/win: Don't strip trailing = on exec_script arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak comment Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..231693b5d2e7b2a6317bdb70c343b30286e2e13d 100644
--- a/tools/gn/function_exec_script.cc
+++ b/tools/gn/function_exec_script.cc
@@ -171,6 +171,13 @@ Value RunExecScript(Scope* scope,
// Make the command line.
const base::FilePath& python_path = build_settings->python_path();
base::CommandLine cmdline(python_path);
+
+ // CommandLine tries to interpret arguments by default. Passing "--" disables
+ // this for everything following the "--", so pass this as the very first
+ // thing to python. Python ignores a -- before the .py file, and this makes
+ // CommandLine let through arguments without modifying them.
+ cmdline.AppendArg("--");
+
cmdline.AppendArgPath(script_path);
if (args.size() >= 2) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698