Skip to content

--matlabLaunchCommandArgs does not accept value starting with "-" (Not enough arguments following) #78

Description

@NOBUTOKA

Describe the bug
When passing a value starting with - to --matlabLaunchCommandArgs, the server exits with a Not enough arguments following: matlabLaunchCommandArgs error, while other strings work as expected.

To Reproduce
From the repository root (after building out/index.js):

  1. Run:

    node out/index.js --stdio --matlabLaunchCommandArgs "xxx"

    The server starts normally.

  2. Then run:

    node out/index.js --stdio --matlabLaunchCommandArgs "-xxx"

    The process exits with the following error (or similar):

    Not enough arguments following: matlabLaunchCommandArgs
    

Expected behavior
--matlabLaunchCommandArgs should accept arbitrary strings as its value, including strings that start with - (e.g. "-xxx"), and pass them through to MATLAB in the same way as "xxx".

Useful Information

  • MATLAB-language-server: current main (commit: 6c7e6b4)
  • Node.js: v24.11.1

Additional context
This looks like the value is not being counted as an argument for matlabLaunchCommandArgs, but I am not sure whether this is intended behavior or a bug in how the CLI options are parsed.

If you need additional information or logs, I can provide them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions