fix(poetry): skip if not installed with official script (#989)
* fix(poetry): skip if not installed with official script * feat(poetry): add poetry_force_self_update config option * docs: give this config a more detailed explanation --------- Co-authored-by: Steve Lau <stevelauc@outlook.com>
This commit is contained in:
@@ -229,6 +229,7 @@ pub struct Python {
|
||||
enable_pip_review_local: Option<bool>,
|
||||
enable_pipupgrade: Option<bool>,
|
||||
pipupgrade_arguments: Option<String>,
|
||||
poetry_force_self_update: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Default, Debug, Merge)]
|
||||
@@ -1627,6 +1628,13 @@ impl Config {
|
||||
.and_then(|python| python.enable_pip_review_local)
|
||||
.unwrap_or(false)
|
||||
}
|
||||
pub fn poetry_force_self_update(&self) -> bool {
|
||||
self.config_file
|
||||
.python
|
||||
.as_ref()
|
||||
.and_then(|python| python.poetry_force_self_update)
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
pub fn display_time(&self) -> bool {
|
||||
self.config_file
|
||||
|
||||
Reference in New Issue
Block a user