Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diactritics on Preview #102

Open
misilot opened this issue May 15, 2023 · 6 comments
Open

Diactritics on Preview #102

misilot opened this issue May 15, 2023 · 6 comments

Comments

@misilot
Copy link

misilot commented May 15, 2023

Hello,

I am seeing unknown diacrtitics when it posts the preview text as GitHub comment. Any ideas on how to fix that?

******************** Domain: domain
1 correction
#1: 
�[31m- DELETE CNAME webhooks.domain domain. ttl=300�[0m

******************** Domain: domain2
1 correction
#1: 
�[31m- DELETE CNAME webhooks.domain domain. ttl=300�[0m

@misilot
Copy link
Author

misilot commented May 15, 2023

It doesn't seem to like the dash

- DELETE CNAME webhooks.domain domain. ttl=300

@tlimoncelli
Copy link

That looks like ESC codes to colorize the output. Try setting the env variable CI to "true" to disable colorization.

Oddly enough... according to https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables that variable will be set for you. Can you verify it is set?

Please share the output of: dnscontrol version

Thanks!

@misilot
Copy link
Author

misilot commented May 17, 2023

It doesn't look like the action supports dnscontrol version. It might be passing -config all the time per the output

Incorrect Usage: flag provided but not defined: -config

      - name: DNSControl version
        uses: koenrh/dnscontrol-action@v3
        with:
          args: version

Though looking at https://github.com/koenrh/dnscontrol-action/blob/main/Dockerfile#L11 it looks like it's 3.27.1
Ok, I found it in some output during the build process, it is "dnscontrol (2586e2b611c0054abbc25c15fe64a25d0ee7b51f) built 28 Feb 23 15:15 UTC"

Run echo "CI Value is : $CI"   # reference the default environment variables
CI Value is : true

@tlimoncelli
Copy link

This might be related to StackExchange/dnscontrol#2354 -- The main DNSControl CI/CD pipeline is inserting hashes instead of versions.

@misilot
Copy link
Author

misilot commented May 17, 2023

This GHA https://github.com/koenrh/dnscontrol-action/blob/main/entrypoint.sh#L12-L15 always adds --config so it can't actually run version as an argument.

@tlimoncelli
Copy link

The �[0m codes you see are colorization ESC sequences. If you see them, then your CI system doesn't support them.

Add --no-colors (i.e. dnscontrol --no-colors preview) to disable colorization.

Normally this flag isn't needed because the colorization disables itself for non-interactive runs but that doesn't seem to work for many (most?) CI systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants