You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib.rs
+32-40Lines changed: 32 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,22 @@
1
1
pubmod command;
2
2
pubmod manifest;
3
+
pubmod process;
3
4
pubmod state;
4
5
pubmod utils;
5
6
6
7
use anyhow::Result;
7
8
use colored::*;
8
9
9
10
use command::{flatpak_builder, run_command};
10
-
use dialoguer::{Select,theme::ColorfulTheme};
11
+
use dialoguer::{theme::ColorfulTheme,Select};
11
12
use manifest::Manifest;
12
13
use state::State;
13
14
use std::fs;
14
15
use utils::{get_a11y_bus_args, get_host_env};
15
16
use walkdir::WalkDir;
16
17
18
+
usecrate::process::kill_process_group;
19
+
17
20
constBUILD_DIR:&str = ".flatplay";
18
21
19
22
pubstructFlatpakManager{
@@ -67,8 +70,7 @@ impl FlatpakManager {
67
70
Ok(())
68
71
}
69
72
70
-
pubfnnew() -> Result<Self>{
71
-
let state = State::load()?;
73
+
pubfnnew(state:State) -> Result<Self>{
72
74
let manifest = ifletSome(path) = &state.active_manifest{
73
75
Some(Manifest::from_file(path)?)
74
76
}else{
@@ -82,10 +84,10 @@ impl FlatpakManager {
82
84
}
83
85
84
86
fnis_build_initialized(&self) -> Result<bool>{
85
-
let repo_dir = format!("{}/repo",BUILD_DIR);
86
-
let metadata_file = format!("{}/metadata", repo_dir);
87
-
let files_dir = format!("{}/files", repo_dir);
88
-
let var_dir = format!("{}/var", repo_dir);
87
+
let repo_dir = format!("{BUILD_DIR}/repo");
88
+
let metadata_file = format!("{repo_dir}/metadata");
89
+
let files_dir = format!("{repo_dir}/files");
90
+
let var_dir = format!("{repo_dir}/var");
89
91
90
92
// Check if all required directories and files exist
91
93
// From gnome-builder: https://gitlab.gnome.org/GNOME/gnome-builder/-/blob/8579055f5047a0af5462e8a587b0742014d71d64/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c#L220
0 commit comments