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

PromptManager.ReadValue isn't displaying output in Powershell ISE #1266

Closed
GaTechThomas opened this issue Oct 26, 2017 · 2 comments
Closed

Comments

@GaTechThomas
Copy link

Have you try trouble shooting doc?

Link to trouble shooting doc: https://www.visualstudio.com/en-us/docs/build/troubleshooting
Yes.

Agent version and platform

Version of your agent? 2.102.0/2.100.1...
2.123.0

OS of the machine running the agent? OSX/Windows/Linux...
Windows

VSTS type and version

VisualStudio.com

If VisualStudio.com, what is your account name?
N/A

What's not working?

Running config.cmd from PowerShell ISE displays only ">> Connect:". It stops there and doesn't display "Enter server URL" as it should and does in PowerShell. It should display something like the info at https://github.com/Microsoft/vsts-agent/blob/master/docs/start/configvsts.md

I've tracked it to PromptManager.ReadValue calling _terminal.Write.

I don't know that putting special code in for the ISE is appropriate, but something should be able to be done to tell the user that the agent is waiting on input. Maybe just info in the prerequisites indicating that it doesn't work with the ISE. It would have saved us a few hours.

Agent and Worker's diag log

Here's the pertinent part from the _diag folders log files:

[2017-10-26 15:01:12Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2017-10-26 15:01:12Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2017-10-26 15:01:12Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider, Agent.Listener
[2017-10-26 15:01:13Z INFO Terminal] WRITE LINE:
[2017-10-26 15:01:13Z INFO Terminal] WRITE LINE: >> Connect:
[2017-10-26 15:01:13Z INFO Terminal] WRITE LINE:
[2017-10-26 15:01:13Z INFO CommandSettings] Arg 'url': ''
[2017-10-26 15:01:13Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-10-26 15:01:13Z INFO PromptManager] ReadValue
[2017-10-26 15:01:13Z INFO Terminal] WRITE: Enter server URL >
[2017-10-26 15:01:13Z INFO Terminal] READ LINE

@TingluoHuang
Copy link
Contributor

@GaTechThomas looks like a limitation for PowerShell ISE.
https://blogs.msdn.microsoft.com/powershell/2009/02/04/console-application-non-support-in-the-ise/

I will update the DOC to say do not use PowerShell ISE to configure agent. :)

@TingluoHuang
Copy link
Contributor

https://github.com/Microsoft/vsts-agent/blob/master/docs/start/envwin.md

Close the issue after i update the doc.

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