mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-13 15:00:15 +01:00
fix: output and remove pkgfile
This commit is contained in:
parent
7e84862558
commit
5c919ad940
3 changed files with 28 additions and 18 deletions
|
|
@ -167,6 +167,15 @@ pub fn split_command(command: &str) -> Vec<String> {
|
|||
split_command
|
||||
}
|
||||
|
||||
pub fn elevate(data: &mut Data, command: &mut String) {
|
||||
for privilege in PRIVILEGE_LIST.iter() {
|
||||
if data.has_executable(privilege) {
|
||||
*command = format!("{} {}", privilege, command);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_error(shell: &str, command: &str) -> String {
|
||||
let error_msg = std::env::var("_PR_ERROR_MSG");
|
||||
let error = if let Ok(error_msg) = error_msg {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue