mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
perf(utils): Add timeout to utils::exec_cmd (#2171)
* perf(utils): Add timeout to `utils::exec_cmd` This adds a timeout to any command executed using the `utils::exec_cmd`. The initial time limit is hard coded to 500ms but if required we can make this configurable. Have also switched the tests to be a bit more granular on which systems they are ignored. * Terminate the processes if they timeout
This commit is contained in:
Generated
+14
-2
@@ -559,9 +559,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.81"
|
||||
version = "0.2.82"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
|
||||
checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929"
|
||||
|
||||
[[package]]
|
||||
name = "libdbus-sys"
|
||||
@@ -928,6 +928,17 @@ dependencies = [
|
||||
"unicode-xid 0.2.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "process_control"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9cac0d971172c65b01208ef9567f52892fc89b1c4530c50e997c6f29da7ee961"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.20.0"
|
||||
@@ -1281,6 +1292,7 @@ dependencies = [
|
||||
"path-slash",
|
||||
"pest",
|
||||
"pest_derive",
|
||||
"process_control",
|
||||
"quick-xml",
|
||||
"rand 0.8.2",
|
||||
"rayon",
|
||||
|
||||
Reference in New Issue
Block a user