Open
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
About Requires states that the #Requires statements can appear on any line in a script. Yet the module PSResourceGet assumes that #Requires -Modules
statement is above comment based help block.
@'
<#PSScriptInfo
.VERSION 1.0.0
.GUID {0}
.AUTHOR Me
.TAGS
#>
<#
.DESCRIPTION
just for testing
#>
#Requires -Modules mymodule
'@ -f (new-guid) | set-content -path test.ps1
Get-PSScriptFileInfo -Path .\test.ps1 | select -ExpandProperty scriptRequiresComment
Expected behavior
RequiredModules
---------------
{mymodule}
Actual behavior
RequiredModules
---------------
{}
Error details
No response
Environment data
PSResourceGet: 0.5.22
PowerShell: 5.1 or 7.3.5
Visuals
No response