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:
David Knaack
2021-02-11 21:34:47 +01:00
committed by GitHub
parent 04d1332f9c
commit eccbda8328
30 changed files with 112 additions and 97 deletions
+1 -2
View File
@@ -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,