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

Fix printing not supported option in restricted mode #1861

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

lwronski
Copy link
Contributor

When I run:

./scala --scala -3 --markdown .

it throw the following error:

Exception in thread "main" java.lang.IndexOutOfBoundsException: 2
        at scala.collection.LinearSeqOps.apply(LinearSeq.scala:131)
        at scala.collection.LinearSeqOps.apply$(LinearSeq.scala:128)
        at scala.collection.immutable.List.apply(List.scala:79)
        at scala.cli.commands.RestrictedCommandsParser$$anon$1.step(RestrictedCommandsParser.scala:39)
        at caseapp.core.parser.EitherParser.step(EitherParser.scala:24)
        at caseapp.core.parser.RecursiveConsParser.step(RecursiveConsParser.scala:26)
        at caseapp.core.parser.ConsParser.step(ConsParser.scala:36)
        at caseapp.core.parser.ConsParser.step(ConsParser.scala:36)
        at caseapp.core.parser.MappedParser.step(MappedParser.scala:25)
        at caseapp.core.parser.MappedParser.step(MappedParser.scala:25)
        at caseapp.core.parser.RecursiveConsParser.step(RecursiveConsParser.scala:26)
        at caseapp.core.parser.MappedParser.step(MappedParser.scala:25)
        at caseapp.core.parser.MappedParser.step(MappedParser.scala:25)
        at caseapp.core.parser.ParserWithNameFormatter.step(ParserWithNameFormatter.scala:21)
        at caseapp.core.parser.ParserMethods.step(ParserMethods.scala:25)
        at caseapp.core.parser.ParserMethods.step$(ParserMethods.scala:12)
        at caseapp.core.parser.Parser.step(Parser.scala:15)
        at caseapp.core.parser.ParserMethods.helper$1(ParserMethods.scala:214)
        at caseapp.core.parser.ParserMethods.scan(ParserMethods.scala:276)
        at caseapp.core.parser.ParserMethods.scan$(ParserMethods.scala:12)
        at caseapp.core.parser.Parser.scan(Parser.scala:15)
        at caseapp.core.parser.ParserMethods.detailedParse(ParserMethods.scala:128)

I fixed extracting option passed by user in RestrictedCommandsParser.

@lwronski lwronski force-pushed the fix-parser-sip-option branch from eb7731f to 1b71c11 Compare February 15, 2023 16:11
@lwronski lwronski merged commit ec18a64 into VirtusLab:main Feb 16, 2023
@Gedochao Gedochao added the bug Something isn't working label Feb 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants