diff options
author | Neil Kistner <neil.kistner@gmail.com> | 2019-09-09 18:14:38 -0500 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-09-09 19:14:38 -0400 |
commit | 9f70ffb7a7d2eeef64c360c553e909d38e44adf0 (patch) | |
tree | 4dccf8a935e027dcf7bc77781eed1554a645d72a /src/modules/python.rs | |
parent | dc8409333e194624896c74c5e5cdb4f664f53f9d (diff) |
fix: Lazy load git repo and only run module if not disabled (#306)
A couple of optimizations are done in this PR. One, we now will check config ahead of time to see if a module is disabled before running any module code. Also, we won't try to discover a git repository unless the module requests access to it.
Diffstat (limited to 'src/modules/python.rs')
-rw-r--r-- | src/modules/python.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/python.rs b/src/modules/python.rs index 61d8189db..487d033d5 100644 --- a/src/modules/python.rs +++ b/src/modules/python.rs @@ -30,7 +30,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { return None; } - let mut module = context.new_module("python")?; + let mut module = context.new_module("python"); let pyenv_version_name = module .config_value_bool("pyenv_version_name") .unwrap_or(false); |