Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI IndexOutOfRangeException with lock file #1676

Closed
BernieWhite opened this issue Nov 22, 2023 · 0 comments · Fixed by #1677
Closed

CLI IndexOutOfRangeException with lock file #1676

BernieWhite opened this issue Nov 22, 2023 · 0 comments · Fixed by #1677
Assignees
Labels
bug Something isn't working feature: cli Issues that relate to PSRule CLI tooling.
Milestone

Comments

@BernieWhite
Copy link
Member

Description of the issue

Loading module versions via lock file generates an exception.

Error output

Unhandled exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at PSRule.Pipeline.CommandLineBuilder.Assert(String[] module, LockFile file, PSRuleOption option, IHostContext hostContext) in /_/src/PSRule/Pipeline/CommandLineBuilder.cs:line 52
   at PSRule.Tool.ClientHelper.RunAnalyze(AnalyzerOptions operationOptions, ClientContext clientContext, InvocationContext invocation) in /_/src/PSRule.Tool/ClientHelper.cs:line 63
   at PSRule.Tool.ClientBuilder.<AddAnalyze>b__19_0(InvocationContext invocation) in /_/src/PSRule.Tool/ClientBuilder.cs:line 125
   at System.CommandLine.Invocation.AnonymousCommandHandler.Invoke(InvocationContext context)
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()

Module in use and version:

  • Module: PSRule
  • Version: 3.0.0-B0084
@BernieWhite BernieWhite added bug Something isn't working feature: cli Issues that relate to PSRule CLI tooling. labels Nov 22, 2023
@BernieWhite BernieWhite added this to the v3.0.0 milestone Nov 22, 2023
@BernieWhite BernieWhite self-assigned this Nov 22, 2023
BernieWhite added a commit to BernieWhite/PSRule that referenced this issue Nov 22, 2023
BernieWhite added a commit to BernieWhite/PSRule that referenced this issue Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature: cli Issues that relate to PSRule CLI tooling.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant