Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(oma-pm): check DEBIAN_FRONTEND is none to set this var #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion oma-pm/src/progress.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::env;

use crate::{apt::AptConfig, dbus::change_status};
use oma_apt::progress::DynInstallProgress;
use tokio::runtime::Runtime;
Expand Down Expand Up @@ -40,7 +42,10 @@ impl OmaAptInstallProgress {
connection,
} = args;

if pm.no_interactive() {
// FIXME: 目前 oma 没有很好的根据 yes 来传参的方式
// 所以先在其他地方判断 DEBIAN_FRONTEND 这个变量是否存在
// 再设定 DEBIAN_FRONTEND
if env::var("DEBIAN_FRONTEND").is_err() && pm.no_interactive() {
std::env::set_var("DEBIAN_FRONTEND", "noninteractive");
}

Expand Down
Loading