1 unstable release
0.1.0 | Jun 10, 2019 |
---|
#6 in #automaat
Used in automaat-server
27KB
378 lines
Automaat Processor: Shell Command
🚧 Work In Progress 🚧
lib.rs
:
An Automaat processor to execute shell commands.
Execute shell commands in an Automaat-based workflow. The return value of the shell command is returned as the output of the processor.
If the shell command returns a non-zero exit code, the processor returns the stderr output as its error value.
All commands are executed within the Context
workspace.
Examples
Execute the echo "hello world"
command in a shell, and return its output.
use automaat_core::{Context, Processor};
use automaat_processor_shell_command::ShellCommand;
let context = Context::new()?;
let processor = ShellCommand {
command: "echo".to_owned(),
arguments: Some(vec!["hello world".to_owned()]),
cwd: None,
paths: None,
};
let output = processor.run(&context)?;
assert_eq!(output, Some("hello world".to_owned()));
Package Features
juniper
– creates a set of objects to be used in GraphQL-based requests/responses.
Dependencies
~2–13MB
~166K SLoC