Program can now run without figlet
This commit is contained in:
parent
0720723e09
commit
1ca0fb7327
1 changed files with 5 additions and 3 deletions
|
@ -45,10 +45,12 @@ fn main() {
|
|||
let figlet = Command::new("figlet")
|
||||
.args(["-f", "smslant", &distro_name.clone()])
|
||||
.output();
|
||||
|
||||
let figlet = figlet.unwrap();
|
||||
let figlet = String::from_utf8_lossy(&figlet.stdout);
|
||||
|
||||
if figlet.is_err() == false {
|
||||
let figlet = figlet.unwrap();
|
||||
let figlet = String::from_utf8_lossy(&figlet.stdout);
|
||||
print!("{}", figlet);
|
||||
}
|
||||
// Print all the things we've been saving.
|
||||
print!("{}", figlet);
|
||||
println!("{}@{}", user.clone().trim(), hostname.clone().trim());
|
||||
|
|
Loading…
Reference in a new issue