Skip to content

Disable color #155

@arunoruto

Description

@arunoruto

I am using statix in my github action to summarize everything a specific push event. While I pipe the output into a text file, it also takes the escape sequences of the color. Is there a way to disable the coloring? Maybe something like a NO_COLOR variable like in deadnix?

My current approach is using sed to filter out the escape sequences:

      - name: Linting
        run: |
          echo "# Statix Check" >> $GITHUB_STEP_SUMMARY
          echo "~~~console" >> $GITHUB_STEP_SUMMARY
          nix run nixpkgs#statix -- check | sed 's/\x1b\[[0-9;]*m//g' >> $GITHUB_STEP_SUMMARY || true
          echo "~~~" >> $GITHUB_STEP_SUMMARY

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions