diff options
Diffstat (limited to '')
| -rw-r--r-- | src/tools/shell.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/shell.rs b/src/tools/shell.rs index c38f032..c64bab3 100644 --- a/src/tools/shell.rs +++ b/src/tools/shell.rs | |||
| @@ -37,7 +37,11 @@ pub fn bash( | |||
| 37 | timeout: Duration, | 37 | timeout: Duration, |
| 38 | cancel: &AtomicBool, | 38 | cancel: &AtomicBool, |
| 39 | ) -> Result<String, String> { | 39 | ) -> Result<String, String> { |
| 40 | let cmd = match args.get("cmd").and_then(|v| v.as_str()) { | 40 | let cmd = match args |
| 41 | .get("cmd") | ||
| 42 | .or_else(|| args.get("command")) | ||
| 43 | .and_then(|v| v.as_str()) | ||
| 44 | { | ||
| 41 | Some(cmd) => cmd.to_string(), | 45 | Some(cmd) => cmd.to_string(), |
| 42 | None => return Err("missing required argument `cmd`".into()), | 46 | None => return Err("missing required argument `cmd`".into()), |
| 43 | }; | 47 | }; |
