PowerShell / PowerShell/PSResourceGet
PSResourceGet module assumes the required modules statement location in script file in specific place
Open
@anamnavi is already working on this.
Since Jul 12, 2023.
Area-InfoFile
feature_request
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.