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

VSCode tasks: to work around known issues #24

Closed
nightroman opened this issue May 31, 2016 · 1 comment
Closed

VSCode tasks: to work around known issues #24

nightroman opened this issue May 31, 2016 · 1 comment

Comments

@nightroman
Copy link
Owner

There are two known issues of tasks generated by New-VSCodeTask.ps1.

Issue 1. Output encoding.

Non ASCII task output may be shown incorrectly in VSCode output window.
See Tasks should support specifying the output encoding

Issue 2. Console is required.

Some tasks may require the console host, for example for interaction (Read-Host, confirmations, etc.)
Some tasks may use colored output, so that in such cases they are better to be invoked in a console.

@nightroman
Copy link
Owner Author

nightroman commented Jun 1, 2016

Both issues are resolved with an extra cmd file used as the task runner.

Issue 1. chcp 65001 does the trick:

chcp 65001 > nul
PowerShell.exe -NoProfile -ExecutionPolicy Bypass "& 'Invoke-Build.ps1' %1"

Issue 2. Task tags #ConsoleHost tell to add an extra parameter and invoke as

start PowerShell.exe -NoExit -NoProfile -ExecutionPolicy Bypass "& 'Invoke-Build.ps1' %1"

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

1 participant