trigger precommit

This commit is contained in:
LDprg 2023-09-10 21:06:13 +02:00
parent dc2f81cb3d
commit 83c61e999e
2 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,6 @@
use clap::Command;
use winapps::RemoteClient;
pub(crate) use clap::Command;
use winapps::freerdp::freerdp_back::Freerdp;
use winapps::RemoteClient;
fn cli() -> Command {
Command::new("winapps-cli")
@ -16,7 +16,7 @@ fn main() {
let cli = cli();
let matches = cli.clone().get_matches();
let client: &dyn RemoteClient = &Freerdp{};
let client: &dyn RemoteClient = &Freerdp {};
match matches.subcommand() {
Some(("check", _)) => {

View File

@ -1,24 +1,27 @@
pub mod freerdp_back {
use std::process::{Command, Stdio};
use crate::{RemoteClient, Config};
use crate::{Config, RemoteClient};
pub struct Freerdp {}
impl RemoteClient for Freerdp {
fn check_depends(&self, _config: Config) {
let mut xfreerdp = Command::new("xfreerdp");
xfreerdp.stdout(Stdio::null());
xfreerdp.args(["-h"]);
xfreerdp.spawn().expect("Freerdp execution failed! It needs to be installed!");
xfreerdp
.spawn()
.expect("Freerdp execution failed! It needs to be installed!");
println!("Freerdp found!");
println!("All dependencies found!");
}
fn run_app(&self, config: Config, _app: &str) {
fn run_app(&self, _config: Config, _app: &str) {
todo!()
}
}
}