diff --git a/Cargo.lock b/Cargo.lock index dc197a5..0b32a49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1456,7 +1456,7 @@ dependencies = [ [[package]] name = "ya-runtime-dbg" -version = "0.2.2" +version = "0.2.3" dependencies = [ "actix", "actix-rt", diff --git a/Cargo.toml b/Cargo.toml index 369ef30..5a4b19d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ya-runtime-dbg" -version = "0.2.2" +version = "0.2.3" authors = ["Golem Factory "] edition = "2018" repository = "https://github.com/golemfactory/ya-runtime-dbg" diff --git a/src/main.rs b/src/main.rs index 876b6de..fdd0ecd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,6 +60,12 @@ struct Args { parse(from_flag = std::ops::Not::not), )] deploy: bool, + /// Additional DEPLOY command arguments + #[structopt(long, multiple = true)] + deploy_arg: Vec, + /// Additional START command arguments + #[structopt(long, multiple = true)] + start_arg: Vec, /// Additional runtime arguments varargs: Vec, } @@ -200,14 +206,13 @@ async fn deploy(args: &Args, ui: UI) -> Result<()> where T: Terminal + 'static, { - let mut rt_args = args.to_runtime_args(); - rt_args.push(OsString::from("deploy")); - ui_info!(ui, "Deploying"); let mut child = runtime_command(&args)? .kill_on_drop(true) - .args(rt_args) + .args(args.to_runtime_args()) + .arg("deploy") + .args(&args.deploy_arg) .stdout(Stdio::piped()) .stderr(Stdio::piped()) .spawn()?; @@ -235,13 +240,13 @@ async fn start( where T: Terminal + 'static, { - let mut rt_args = args.to_runtime_args(); - rt_args.push(OsString::from("start")); - ui_info!(ui, "Starting"); let mut command = runtime_command(&args)?; - command.args(rt_args); + command + .args(args.to_runtime_args()) + .arg("start") + .args(args.start_arg); let (tx, mut rx) = mpsc::channel(1); let service = spawn(command, EventHandler::new(tx, ui.clone()))