From b148ac9d9aefb18baddbf9e28ed33b1b8c6e96e6 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 16 Nov 2012 09:33:39 +0900 Subject: Allow command options to be set from environment variables Extend the Command base class to allow options to be set from values in environment variables, if the user has not given the option on the command line and the environment variable is set. Derived classes of Command can override the implementation of the method _GetEnvironmentOptions to configure which of its options may be set from environment variables. Change-Id: I7c780bcf9644d6567893d9930984c054bce7351e --- main.py | 1 + 1 file changed, 1 insertion(+) (limited to 'main.py') diff --git a/main.py b/main.py index 83967f77..9cc2639a 100755 --- a/main.py +++ b/main.py @@ -120,6 +120,7 @@ class _Repo(object): return 1 copts, cargs = cmd.OptionParser.parse_args(argv) + copts = cmd.ReadEnvironmentOptions(copts) if not gopts.no_pager and not isinstance(cmd, InteractiveCommand): config = cmd.manifest.globalConfig -- cgit v1.2.3-54-g00ecf