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

Ansi Color like : [0;31m output that as char and still use cmdhost default color #123

Closed
tebeco opened this issue Mar 1, 2018 · 7 comments

Comments

@tebeco
Copy link

tebeco commented Mar 1, 2018

Your Windows build number: (Type ver at a Windows Command Prompt)

> ver
Microsoft Windows [Version 10.0.17110.1000]

What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

  • Just downloaded Vault for Windows x64,
  • unzipped
  • opened a CMD ran vault read command :
>vault read
�[0;31mNot enough arguments (expected 1, got 0)�[0m
  • Then opened WSL (Ubuntu)
>vault read
Not enough arguments (expected 1, got 0)

No more color char but still gray

  • @ctolkien on Slack gave me few hint to fix it :
    image
    it was already UNCHECKED on both CMD and WSL (WSL was already on code page 65001)
>chcp
Active code page: 437

>chcp 65001
Active code page: 65001

>vault read
�[0;31mNot enough arguments (expected 1, got 0)�[0m
  • I even started a new CMD to be sure
>vault read
�[0;31mNot enough arguments (expected 1, got 0)�[0m

What's wrong / what should be happening instead:

[0;31 should be Red (hint: it is an error message)

@tebeco tebeco changed the title Color fron syntaxe like : [0;31m output that as car and still use cmdhost default color Ansi Color like : [0;31m output that as char and still use cmdhost default color Mar 1, 2018
@tebeco
Copy link
Author

tebeco commented Mar 1, 2018

image

@parkovski
Copy link

That looks like vault doesn't set ENABLE_VIRTUAL_TERMINAL_PROCESSING.

@tebeco
Copy link
Author

tebeco commented Mar 2, 2018

is that an env variable i can set in the cmdhost so it will enable it for vault ?
a PInvoke ? (so maybe a simple C# call)

or it has to be done within vault ?

@parkovski
Copy link

Vault has to do that - it's either a bug in vault or whatever library they use to set up the console.

@jefferai
Copy link

jefferai commented Mar 3, 2018

@parkovski I think it's more like, how would we ever know that was necessary :-)

@jefferai
Copy link

jefferai commented Mar 3, 2018

@tebeco you can probably close this, we'll figure out something on the Go side until Windows handles this by default.

@tebeco tebeco closed this as completed Mar 3, 2018
@tebeco
Copy link
Author

tebeco commented Mar 3, 2018

yep thx for all the explanations

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

3 participants