Skip to content

Commit

Permalink
trigger precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
LDprg committed Sep 10, 2023
1 parent dc2f81c commit 83c61e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions winapps-cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -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", _)) => {
Expand Down
13 changes: 8 additions & 5 deletions winapps/src/freerdp.rs
Original file line number Diff line number Diff line change
@@ -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!()
}
}
}


0 comments on commit 83c61e9

Please sign in to comment.