Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

--color=always removes the benefits of this action #196

Open
2 of 3 tasks
EdJoPaTo opened this issue Oct 29, 2021 · 0 comments
Open
2 of 3 tasks

--color=always removes the benefits of this action #196

EdJoPaTo opened this issue Oct 29, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@EdJoPaTo
Copy link

EdJoPaTo commented Oct 29, 2021

Do the checklist before filing an issue:

Description

This action runs cargo with arguments. When cargo finds problems they are annotated in a way GitHub can display them at the exact file / line.

When --color=always is added this doesn't work anymore.

You can reproduce this by creating some issue which cargo highlights. This works properly. When --color=always is added the output reduces to "[…] failed with exit code 101".

Workflow code

      - name: Check clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
-          args: --verbose --locked --all-targets ${{ matrix.features }} -- ${{ matrix.clippyargs }}
+          args: --verbose --locked --all-targets ${{ matrix.features }} --color=always -- ${{ matrix.clippyargs }}

Action output

works

https://github.com/EdJoPaTo/rust-binary-metafile-template/actions/runs/1399909575

works.zip

works

doesn't work

https://github.com/EdJoPaTo/rust-binary-metafile-template/actions/runs/1399969307

doesnt-work.zip

doesntwork

Expected behavior

Described above

Additional context

--color=always is probably not working because of additional escape codes in the output.

Personal opinion: I do not think its interesting to support color output. I think outputting a warning when --color is specified is helpful to prevent people from running into this issue.

@EdJoPaTo EdJoPaTo added the bug Something isn't working label Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant