-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This line throws an error if the Unreleased is misspelled.
| "Date" = Get-Date ($Release -split "\] \- ")[1].Split($FileNewline)[0] |
Having the change log like:
## [Unrelesed]
## [0.12.0] - 2022-12-10
### Added
- Something addedCalling this:
Get-ChangelogData -Path .\CHANGELOG.mdthrows this:
Exception :
Type : System.Management.Automation.RuntimeException
ErrorRecord :
Exception :
Type : System.Management.Automation.ParentContainsErrorRecordException
Message : You cannot call a method on a null-valued expression.
HResult : -2146233087
CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : InvokeMethodOnNull
InvocationInfo :
ScriptLineNumber : 113
OffsetInLine : 25
HistoryId : -1
ScriptName : C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public\Get-ChangelogData.ps1
Line : "Date" = Get-Date ($Release -split "\] \- ")[1].Split($FileNewline)[0]
PositionMessage : At C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public\Get-ChangelogData.ps1:113 char:25
+ … "Date" = Get-Date ($Release -split "\] \- ")[1].Split($FileNewline …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PSScriptRoot : C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public
PSCommandPath : C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public\Get-ChangelogData.ps1
CommandOrigin : Internal
ScriptStackTrace : at Get-ChangelogData, C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public\Get-ChangelogData.ps1: line 113
at <ScriptBlock>, <No file>: line 1
TargetSite : System.Object CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object, System.Object)
Message : You cannot call a method on a null-valued expression.
Source : Anonymously Hosted DynamicMethods Assembly
HResult : -2146233087
StackTrace :
at CallSite.Target(Closure, CallSite, Object, Object)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at lambda_method2941(Closure, Object[], StrongBox`1[], InterpretedFrame)
CategoryInfo : InvalidOperation: (:) [], RuntimeException
FullyQualifiedErrorId : InvokeMethodOnNull
InvocationInfo :
ScriptLineNumber : 113
OffsetInLine : 25
HistoryId : -1
ScriptName : C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public\Get-ChangelogData.ps1
Line : "Date" = Get-Date ($Release -split "\] \- ")[1].Split($FileNewline)[0]
PositionMessage : At C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public\Get-ChangelogData.ps1:113 char:25
+ … "Date" = Get-Date ($Release -split "\] \- ")[1].Split($FileNewline …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PSScriptRoot : C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public
PSCommandPath : C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public\Get-ChangelogData.ps1
CommandOrigin : Internal
ScriptStackTrace : at Get-ChangelogData, C:\source\DscResource.Common\output\RequiredModules\ChangelogManagement\3.0.0\public\Get-ChangelogData.ps1: line 113
at <ScriptBlock>, <No file>: line 1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working