-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Labels
Resolution-AnsweredThe question is answered.The question is answered.Resolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).Resolution-FixedThe issue is fixed.The issue is fixed.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
GitHub Copilot has produced the following code:
Write-Host "🔧 Generating version.h at $versionHeaderPath"
with that code in a .ps1
file, Get-Help
fails:
Get-Help : Get-Help could not find .\generate_version.ps1 in a help file in this session. To download updated help topics type: "Update-Help". To get help online, search for the help
topic in the TechNet library at https:/go.microsoft.com/fwlink/?LinkID=107116.
At line:55 char:5
+ Get-Help @PSBoundParameters | more
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
Removing that character fixes the issue.
Here's such an offending file:
Expected behavior
NAME
C:\Development\ST\PVPAccessory\generate_version.ps1
SYNOPSIS
Generates version.h based on git tags and commit info.
SYNTAX
C:\Development\ST\PVPAccessory\generate_version.ps1 [<CommonParameters>]
DESCRIPTION
This script creates a version header file for the firmware using git metadata.
RELATED LINKS
REMARKS
To see the examples, type: "get-help C:\Development\ST\PVPAccessory\generate_version.ps1 -examples".
For more information, type: "get-help C:\Development\ST\PVPAccessory\generate_version.ps1 -detailed".
For technical information, type: "get-help C:\Development\ST\PVPAccessory\generate_version.ps1 -full".
-- More --
Actual behavior
Get-Help : Get-Help could not find .\generate_version.ps1 in a help file in this session. To download updated help topics type: "Update-Help". To get help online, search for the help
topic in the TechNet library at https:/go.microsoft.com/fwlink/?LinkID=107116.
At line:55 char:5
+ Get-Help @PSBoundParameters | more
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
Error details
Environment data
î‚´
Name Value
---- -----
PSVersion 7.5.3
PSEdition Core
GitCommitId 7.5.3
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Metadata
Metadata
Assignees
Labels
Resolution-AnsweredThe question is answered.The question is answered.Resolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).Resolution-FixedThe issue is fixed.The issue is fixed.