Terragrunt: No colour output since release 0.17.0 on Windows x64

Created on 26 Nov 2018  ·  17Comments  ·  Source: gruntwork-io/terragrunt

It seems 0.17.x breaks colour output, and prints the escape sequences instead, at least on Windows x64. This worked as intended on 0.16.x.

0.16.x:
terragrunt_0 16 x png

0.17.x:
terragrunt_0 17 x

System:

  • Windows 10 Enterprise build 17134
  • Terraform 0.11.7 and 0.11.10
  • Terragrunt 0.16.10, 0.16.14, 0.17.0, 0.17.1, 0.17.2
bug help wanted

Most helpful comment

Ok, if I change to the temporary directory in the terragrunt cache, and run terraform directly, color output works fine in powershell. So I do think there is something about how terragrunt is processing the output now that is causing the problem...

All 17 comments

Ah, bummer. We did mess with stdout/stderr and perhaps broke something. v0.17.3 had some stdout/stderr fixes. Would you mind trying it out to see if it happens to fix the issue you're seeing?

Of course, but alas, same on 0.17.3.

Color seems fine in powershell, is the problem limited to a cmd shell?

Sorry, should have included in description - I'm using PowerShell Core 6.0.4.

@lorengordon Are you on v0.17.3 and the color output is working on Windows?

I can confirm that on Mac, it works fine with v0.17.3. I don't have a Windows box to test with, so it may be a bit tricky to debug. Help/PRs/ideas are very welcome!

@brikis98 Yes indeed, terragrunt v0.17.3, terraform v0.11.10, Windows 10 1809 Build 17763.134, PowerShell 5 (I think, PowerShell versioning is a mess).

> terragrunt -version
terragrunt version v0.17.3

> terraform -version
Terraform v0.11.10

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17763.134
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.134
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

In my powershell is not working.

Windows 10.0.17134 Build 17134

> terragrunt -version
terragrunt version v0.17.3

> terraform -version
Terraform v0.11.10

> $PSVersionTable

Name                                       Value
----                                           -----
PSVersion                                 5.1.17134.407
PSEdition                                  Desktop
PSCompatibleVersions             {1.0, 2.0, 3.0, 4.0...}
BuildVersion                             10.0.17134.407
CLRVersion                               4.0.30319.42000
WSManStackVersion                3.0
PSRemotingProtocolVersion    2.3
SerializationVersion                  1.1.0.1

Hmm, something has indeed changed... my workstation rebooted after installing some patches, and now I also just see the sequences in powershell rather than color output.

Ok, if I change to the temporary directory in the terragrunt cache, and run terraform directly, color output works fine in powershell. So I do think there is something about how terragrunt is processing the output now that is causing the problem...

Oi. Now that I've run terraform directly that one time and got color output, it seems it initialized something such that now color output works in terragrunt. Guessing that might explain why it was working for me earlier but not others on this thread, and then why it stopped working for me also after a reboot. 🤕 🤦‍♂️

Now that I've run terraform directly that one time and got color output, it seems it initialized something such that now color output works in terragrunt.

Eh, that wasn't right either. Forgot I was using a wrapper around terragrunt that was itself initializing the color output (#pythonftw!).

Problems is always here with terragrunt v0.17.4, a workarround is known ?

Thanks !

Maybe someone can decipher how terraform is initializing color output, and implement that in terragrunt?

Just started using Terragrunt, great tool, but this is still really broken in Windows, both Powershell and the CMD prompt.
Any plans on fixing? Terraform is fine.
If we can't get the color coding to work, can we at least remove the horribly hard to read character encoding?

Unfortunately, we're a bit buried to take on this any time soon. A workaround to disable colors would be to use extra_arguments to pass in -no-color.

I created this issue under another account, and kinda forgot about it. Sorry.

I'm currently using:

  • Terraform 0.12.24
  • Terragrunt 0.23.2
  • PowerShell Core 7.0.0
  • Windows Terminal Preview 0.10

FWIW, I haven't had this issue for a looong time by now - several versions of all of the above from now. Have you other folks seen it on recent versions?

Was this page helpful?
0 / 5 - 0 ratings