Skip to content

Commit

Permalink
fix(main): fixed logo embedding #1358
Browse files Browse the repository at this point in the history
  • Loading branch information
hitenkoku committed Jun 6, 2024
1 parent 8163073 commit 1ef8154
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2251,9 +2251,8 @@ impl App {

/// output logo
fn output_logo(&self, stored_static: &StoredStatic) {
let fp = utils::check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), "art/logo.txt", true)
.unwrap();
let content = fs::read_to_string(fp).unwrap_or_default();
let logo = Arts::get("logo.txt").unwrap();
let content = std::str::from_utf8(logo.data.as_ref()).unwrap_or_default();
let output_color = if stored_static.common_options.no_color {
None
} else {
Expand All @@ -2262,7 +2261,7 @@ impl App {
write_color_buffer(
&BufferWriter::stdout(ColorChoice::Always),
output_color,
&content,
content,
true,
)
.ok();
Expand Down

0 comments on commit 1ef8154

Please sign in to comment.