diff --git a/src/install.rs b/src/install.rs index 5d7d6af2..79adda75 100644 --- a/src/install.rs +++ b/src/install.rs @@ -1611,6 +1611,9 @@ fn print_dir( let _ = write!(stdin, "{}", c.bold.paint(s)); continue; } + if file.file_type()?.is_dir() { + continue; + } let _ = writeln!(stdin, "{}", c.bold.paint(file.path().display().to_string())); if bat { @@ -1630,14 +1633,14 @@ fn print_dir( })?; let _ = stdin.write_all(&output.stdout); } else { - let mut pkgbbuild = OpenOptions::new() + let mut pkgfile = OpenOptions::new() .read(true) .open(file.path()) .with_context(|| { tr!("failed to open: {}", file.path().display().to_string()) })?; buf.clear(); - pkgbbuild.read_to_end(buf)?; + pkgfile.read_to_end(buf)?; let _ = match std::str::from_utf8(buf) { Ok(_) => stdin.write_all(buf),