mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
feat: allow changing default command timeout (#2283)
* feat: allow changing default command timeout * fix clippy * add doc to exec_cmd in Context * update docs in CONTRIBUTING.md * Fix comment in CONTRIBUTING.md Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com> Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,6 @@ use super::{Context, Module, RootModuleConfig};
|
||||
|
||||
use crate::configs::crystal::CrystalConfig;
|
||||
use crate::formatter::StringFormatter;
|
||||
use crate::utils;
|
||||
|
||||
/// Creates a module with the current Crystal version
|
||||
///
|
||||
@@ -35,7 +34,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
})
|
||||
.map(|variable| match variable {
|
||||
"version" => format_crystal_version(
|
||||
utils::exec_cmd("crystal", &["--version"])?.stdout.as_str(),
|
||||
context.exec_cmd("crystal", &["--version"])?.stdout.as_str(),
|
||||
)
|
||||
.map(Ok),
|
||||
_ => None,
|
||||
|
||||
Reference in New Issue
Block a user