nixenv: filter out user setting warninsg too
This commit is contained in:
parent
a2bbc8d258
commit
9f70ab9c13
|
@ -353,7 +353,7 @@ fn lines_from_file(file: fs::File) -> Vec<String> {
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_user_setting_warning(line: &str) -> bool {
|
pub fn is_user_setting_warning(line: &str) -> bool {
|
||||||
let line = line.trim();
|
let line = line.trim();
|
||||||
line.starts_with("warning: ignoring the user-specified setting '")
|
line.starts_with("warning: ignoring the user-specified setting '")
|
||||||
&& line.ends_with("because it is a restricted setting and you are not a trusted user")
|
&& line.ends_with("because it is a restricted setting and you are not a trusted user")
|
||||||
|
|
|
@ -43,6 +43,7 @@ impl HydraNixEnv {
|
||||||
.collect::<Result<Vec<String>, _>>()?
|
.collect::<Result<Vec<String>, _>>()?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|msg| msg.trim().len() > 0)
|
.filter(|msg| msg.trim().len() > 0)
|
||||||
|
.filter(|line| !nix::is_user_setting_warning(line))
|
||||||
.collect::<Vec<String>>();
|
.collect::<Vec<String>>();
|
||||||
|
|
||||||
if evaluation_errors.len() > 0 {
|
if evaluation_errors.len() > 0 {
|
||||||
|
|
Loading…
Reference in a new issue