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

Unified Diff: tools/gn/command_args.cc

Issue 654333002: gn: Check GN_EDITOR before EDITOR in environment variables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lrn2spl Created 6 years, 2 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/command_args.cc
diff --git a/tools/gn/command_args.cc b/tools/gn/command_args.cc
index e2f4a9c09a7f11acab47339bbc0163ee60ec49d3..80ed1c27b0ef51f8fe6a33d887e9fa88469d0d98 100644
--- a/tools/gn/command_args.cc
+++ b/tools/gn/command_args.cc
@@ -199,6 +199,8 @@ bool RunEditor(const base::FilePath& file_to_edit) {
// Prefer $VISUAL, then $EDITOR, then vi.
brettw 2014/10/15 21:11:20 Maybe just remove this comment?
const char* editor_ptr = getenv("VISUAL");
if (!editor_ptr)
+ editor_ptr = getenv("GN_EDITOR");
+ if (!editor_ptr)
editor_ptr = getenv("EDITOR");
if (!editor_ptr)
editor_ptr = "vi";
« 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