From 7341607c294a633477005d777bd03b18522aabf4 Mon Sep 17 00:00:00 2001 From: Dennis Waitong Lam <77250215+Funinja@users.noreply.github.com> Date: Fri, 9 Dec 2022 04:41:59 -0500 Subject: [PATCH] fix(buf): broken icon on windows 10 (#4689) Closes https://github.com/starship/starship/issues/4608 --- .github/config-schema.json | 4 ++-- docs/config/README.md | 2 +- src/configs/buf.rs | 2 +- src/modules/buf.rs | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/config-schema.json b/.github/config-schema.json index 54944b4a..2cb9bb5f 100644 --- a/.github/config-schema.json +++ b/.github/config-schema.json @@ -73,7 +73,7 @@ "disabled": false, "format": "with [$symbol($version )]($style)", "style": "bold blue", - "symbol": "🦬 ", + "symbol": "🐃 ", "version_format": "v${raw}" }, "allOf": [ @@ -1854,7 +1854,7 @@ "type": "string" }, "symbol": { - "default": "🦬 ", + "default": "🐃 ", "type": "string" }, "style": { diff --git a/docs/config/README.md b/docs/config/README.md index b7a1f0d1..0d4d13ac 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -558,7 +558,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | | `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | | `version_format` | `'v${raw}'` | The version format. | -| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | +| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | diff --git a/src/configs/buf.rs b/src/configs/buf.rs index f59e70d2..7d636ee7 100644 --- a/src/configs/buf.rs +++ b/src/configs/buf.rs @@ -23,7 +23,7 @@ impl<'a> Default for BufConfig<'a> { BufConfig { format: "with [$symbol($version )]($style)", version_format: "v${raw}", - symbol: "🦬 ", + symbol: "🐃 ", style: "bold blue", disabled: false, detect_extensions: vec![], diff --git a/src/modules/buf.rs b/src/modules/buf.rs index 4d54063b..0c170454 100644 --- a/src/modules/buf.rs +++ b/src/modules/buf.rs @@ -1,5 +1,4 @@ use super::{Context, Module, ModuleConfig}; - use crate::configs::buf::BufConfig; use crate::formatter::StringFormatter; use crate::formatter::VersionFormatter; @@ -103,8 +102,10 @@ mod tests { .sync_all() .unwrap(); let actual = ModuleRenderer::new("buf").path(dir.path()).collect(); - let expected = Some(format!("with {}", Color::Blue.bold().paint("🦬 v1.0.0 "))); + + let expected = Some(format!("with {}", Color::Blue.bold().paint("🐃 v1.0.0 "))); assert_eq!(expected, actual); + dir.close().unwrap(); }