feat: add show_distribution_summary config option (#1259)
This commit is contained in:
@@ -347,6 +347,8 @@ pub struct Misc {
|
||||
no_self_update: Option<bool>,
|
||||
|
||||
log_filters: Option<Vec<String>>,
|
||||
|
||||
show_distribution_summary: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, ValueEnum)]
|
||||
@@ -1593,6 +1595,14 @@ impl Config {
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
pub fn show_distribution_summary(&self) -> bool {
|
||||
self.config_file
|
||||
.misc
|
||||
.as_ref()
|
||||
.and_then(|misc| misc.show_distribution_summary)
|
||||
.unwrap_or(true)
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
pub fn npm_use_sudo(&self) -> bool {
|
||||
self.config_file
|
||||
|
||||
Reference in New Issue
Block a user