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

PowerShell Hangs due missing -NonInteractive #25

Open
bormm opened this issue May 28, 2020 · 4 comments
Open

PowerShell Hangs due missing -NonInteractive #25

bormm opened this issue May 28, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@bormm
Copy link

bormm commented May 28, 2020

Where are you running it?

Azure DevOps Service (VSTS) + Self Hosted Agent with Windows 10 + Visual Studio

Version of Extension/Task

Version 10.0.3

Expected behaviour and actual behaviour

My task just does "nothing" and was frozen. I tried to find out what the issue was and started the command from the log manually:

powershell.exe d:\azdevops-build\_tasks\Pester_cca5462b-887d-4617-bf3f-dcf0d3c622e9\10.0.3\Pester.ps1 -TestFolder d:\azdevops-build\1\s\Tests.Pester -resultsFile d:\azdevops-build\1\s\Tests.Pester\Test-Result.xml -run32Bit False -additionalModulePath d:\azdevops-build\1\s/Modules
TestFolder d:\azdevops-build\1\s\Tests.Pester

which results in a

Der Anbieter "nuget v2.8.5.208" ist nicht installiert.
"nuget" kann manuell von https://onegetcdn.azureedge.net/providers/Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll heruntergeladen und installiert werden.
Soll PackageManagement automatisch heruntergeladen und "nuget" jetzt installiert werden?
[J] Ja [N] Nein [H] Anhalten [?] Hilfe (Standard ist "J"):

So the Task stopped by waiting for some user input, which is of course not possible. The powershell.exe should be started noninteractive like:
powershell d:\azdevops-build\_tasks\Pester_cca5462b-887d-4617-bf3f-dcf0d3c622e9\10.0.3\Pester.ps1 -NonInteractive [...]

Steps to reproduce the problem

Start something waiting for interaction.

@ChrisLGardner
Copy link
Collaborator

Thanks for reporting this, there's another solution I'll put in place. I'll try to find time for it tomorrow or this weekend.

@ChrisLGardner
Copy link
Collaborator

I've published a new version of the extension which should attempt to install nuget 2.8.5.208 from now on if it's not available. That should hopefully resolve this issue as it'll do that regardless of if it's an interactive session or not.

Let me know if you're still having issues and I'll see if there's any better solutions that can be taken.

@bormm
Copy link
Author

bormm commented Jun 2, 2020

This specific issue seems to be fixed by this update, but I am wondering how other input related issues could be hard to be found out, if the shell is started interactive and will just hang.

@ChrisLGardner ChrisLGardner self-assigned this Jun 3, 2020
@ChrisLGardner ChrisLGardner added the enhancement New feature or request label Jun 3, 2020
@abbgrade
Copy link

abbgrade commented Nov 8, 2022

It looks like, that it's not fixed in version 10.3.10.

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

No branches or pull requests

3 participants