feat: fix exec runner issue
This commit is contained in:
@@ -29,7 +29,10 @@ type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
// region: Utilities Functions
|
||||
|
||||
fn stringified_exts_to_indices(program: &wfassoc::Program, exts: Vec<String>) -> Result<Vec<usize>> {
|
||||
fn stringified_exts_to_indices(
|
||||
program: &wfassoc::Program,
|
||||
exts: Vec<String>,
|
||||
) -> Result<Vec<usize>> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
@@ -45,17 +48,21 @@ fn run_unregister(mut program: wfassoc::Program, scope: wfassoc::Scope) -> Resul
|
||||
Ok(program.unregister(scope)?)
|
||||
}
|
||||
|
||||
fn run_status(program: wfassoc::Program, view: wfassoc::View) -> Result<()> {
|
||||
if program.is_registered(view)? {
|
||||
fn run_status(program: wfassoc::Program, scope: wfassoc::Scope) -> Result<()> {
|
||||
if program.is_registered(scope)? {
|
||||
println!("Application is installed.");
|
||||
} else {
|
||||
println!("Application is not installed.");
|
||||
}
|
||||
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn run_ext_link(program: wfassoc::Program, scope: wfassoc::Scope, exts: Vec<String>) -> Result<()> {
|
||||
fn run_ext_link(
|
||||
mut program: wfassoc::Program,
|
||||
scope: wfassoc::Scope,
|
||||
exts: Vec<String>,
|
||||
) -> Result<()> {
|
||||
let exts = stringified_exts_to_indices(&program, exts)?;
|
||||
for index in exts {
|
||||
program.link_ext(scope, index)?;
|
||||
@@ -64,7 +71,7 @@ fn run_ext_link(program: wfassoc::Program, scope: wfassoc::Scope, exts: Vec<Stri
|
||||
}
|
||||
|
||||
fn run_ext_unlink(
|
||||
program: wfassoc::Program,
|
||||
mut program: wfassoc::Program,
|
||||
scope: wfassoc::Scope,
|
||||
exts: Vec<String>,
|
||||
) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user