Skip to content

Script starting with comment is not executed #1189

@qubicmio

Description

@qubicmio

Summary

After upgrading to spring shell version 3.4.1 scripts starting with a comment (//) are not executed anymore. Version 3.4.0 does not have that problem.

System

Linux: 6.16.9+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.16.9-1 (2025-09-27) x86_64 GNU/Linux
Java version: openjdk version "21.0.9-ea" 2025-10-21
Spring boot version: 3.5.6
Spring shell version: 3.4.1

Status quo:

After upgrading to spring shell version 3.4.1 scripts starting with a comment (//) are not executed anymore.

Wanted behavior:

Even if a script starts with a comment the following lines should be executed.

Reproduce:

Run shell:>script --file test.script interactively.

File test.script that works (prints help text):

help

File test.script that doesn't work (prints nothing):

// test
help

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/need-triageTeam needs to triage and take a first look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions