From ab441541959f5bc2269b50a397ee3bc6e28b98d6 Mon Sep 17 00:00:00 2001 From: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Date: Tue, 17 Sep 2024 17:59:45 +0800 Subject: [PATCH] fix color output in CI --- .github/workflows/ci.yml | 4 ++-- pest/src/error.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8445689e..75bf3439 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: cargo clippy run: cargo clippy --all --features pretty-print,const_prec_climber,memchr,grammar-extras,miette-error --all-targets -- -Dwarnings - name: cargo test - run: cargo test --all --features pretty-print,const_prec_climber,memchr,grammar-extras,miette-error --release + run: NO_COLOR=0 cargo test --all --features pretty-print,const_prec_climber,memchr,grammar-extras,miette-error --release - name: cargo test (ignored) run: cargo test -p pest_grammars --lib --verbose --release -- --ignored tests::toml_handles_deep_nesting_unstable @@ -101,7 +101,7 @@ jobs: - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo llvm-cov --features pretty-print,const_prec_climber,memchr,grammar-extras,miette-error --workspace --lcov --output-path lcov.info + run: NO_COLOR=0 cargo llvm-cov --features pretty-print,const_prec_climber,memchr,grammar-extras,miette-error --workspace --lcov --output-path lcov.info - name: Upload Results to Codecov uses: codecov/codecov-action@v3 with: diff --git a/pest/src/error.rs b/pest/src/error.rs index 0142b342..02966d4d 100644 --- a/pest/src/error.rs +++ b/pest/src/error.rs @@ -1169,7 +1169,7 @@ mod tests { assert_eq!( format!("{:?}", miette_error), - vec![ + [ " \u{1b}[31m×\u{1b}[0m Failure to parse at (2, 1)", " ╭────", " \u{1b}[2m1\u{1b}[0m │ def",