You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ResourceUnavailable: The script 'AutoPackager.ps1' cannot be run because the following modules that are specified by the "#requires" statements of the script are missing: Nevergreen.
Yet it works if you retry!
I suspect this might be down to the version format used. I have copied the version format used by Evergreen, i.e. YYMM.Build, except my first release was 2105.001. However when I published the module it was coming up as 2105.1. Seeing that it stripped the preceeding zeroes, I just called the next release 2105.2 in the module manifest.
Visiting the Powershell Gallery at https://www.powershellgallery.com/packages/Nevergreen though redirects to 2105.1 instead of the latest version, which is odd, and the reason why I suspect the version being a cause.
The text was updated successfully, but these errors were encountered:
When publishing the module, empty folders are removed. The Private folder was empty, and a non-existent Private folder was throwing an error during the init of import-module. Adding -ErrorAction Ignore to the line that scans for functions there seems to have sorted it!
For some reason, most likely a bug in Powershell, if you add this Requires statement to your code:
#Requires -Modules @{ ModuleName='Nevergreen'; ModuleVersion='2105.2' }
It fails with:
ResourceUnavailable: The script 'AutoPackager.ps1' cannot be run because the following modules that are specified by the "#requires" statements of the script are missing: Nevergreen.
Yet it works if you retry!
I suspect this might be down to the version format used. I have copied the version format used by Evergreen, i.e. YYMM.Build, except my first release was 2105.001. However when I published the module it was coming up as 2105.1. Seeing that it stripped the preceeding zeroes, I just called the next release 2105.2 in the module manifest.
Visiting the Powershell Gallery at https://www.powershellgallery.com/packages/Nevergreen though redirects to 2105.1 instead of the latest version, which is odd, and the reason why I suspect the version being a cause.
The text was updated successfully, but these errors were encountered: