mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
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.
This commit is contained in:
committed by
Matan Kushner
parent
dc8409333e
commit
9f70ffb7a7
+1
-1
@@ -37,10 +37,10 @@ log = "0.4.8"
|
||||
# battery is optional (on by default) because the crate doesn't currently build for Termux
|
||||
# see: https://github.com/svartalf/rust-battery/issues/33
|
||||
battery = { version = "0.7.4", optional = true }
|
||||
lazy_static = "1.4.0"
|
||||
path-slash = "0.1.1"
|
||||
unicode-segmentation = "1.3.0"
|
||||
gethostname = "0.2.0"
|
||||
once_cell = "1.1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.1.0"
|
||||
|
||||
Reference in New Issue
Block a user