-
Notifications
You must be signed in to change notification settings - Fork 136
Can't publish module to local repository since v2.1.3 #478
Comments
That's quite odd. If you explicitly run the previous build (import-module powershellget -requiredversion ...) does the issue reproduce? |
OK, it's weird. I've tried to publish other popular module - Plaster. And it works with both builds. So I did little test and reinstalled latest Pester module from PSGallery (4.8.1) but it didn't help and I can't publish it with v2.1.3. Edit: |
Thanks! I can reproduce the issue. Nuget.exe is not terminating when we run it to generate the package. So far I'm not sure why, the same command-line completes just fine when run interactively. |
The issue is, when building some packages nuget writes enough data to standard out to fill the buffer, then blocks. But the calling script doesn't read anything from the output until it nuget has exited. It only affects some packages because different packages produce different amounts of output from nuget/dotnet. |
2.1.3 appears to be installed in Azure Pipelines hosted agents, so I am running into this there. Maybe you can drop a word to whoever maintains that that this fix could be welcome? I am not even sure how to upgrade, Update-Module does not appear to install a newer version there for some reason. |
The publishing process has hung twice now. Seems to be due to a bad version of PowerShellGet. Ref: https://github.com/PowerShell/PowerShellGet/issues/478
The publishing process has hung twice now. Seems to be due to a bad version of PowerShellGet. Ref: https://github.com/PowerShell/PowerShellGet/issues/478
@edyoung nice finding. How to work around it?
|
In my case, I have sub-folders for my customer PowerShell module. Trying to find a way to trick nuget/dotnet. Placing everything into /tools sub-folder didn't work.
|
@edyoung I might be wrong but maybe we might need to add something like for the PR https://github.com/PowerShell/PowerShellGet/pull/479 while generating $CsprojContent?
Feels that we might need to suppress output warnings by dotnet pack for some warning. These might be exactly the warning which go to the output and locking dotnet.exe. Looking into how the output is read, it indeed can get full and async read might help. Similar challenge mentioned on SO: |
Same issue under linux container, azuresdk/azure-powershell-core with dotnet-sdk 3.1 |
Uh oh!
There was an error while loading. Please reload this page.
Steps to reproduce
Register local repository:
Try to publish any module to local repository:
Expected behavior
Module is published successfully on PowerShellGet v2.1.2

Actual behavior
Publish-Module hangs indefinitely on PowerShellGet v2.1.3

Environment data
The text was updated successfully, but these errors were encountered: