mathworks / mathworks/MATLAB-language-server
`--matlabLaunchCommandArgs` does not accept value starting with "-" (Not enough arguments following)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 125
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
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):
-
Run:
node out/index.js --stdio --matlabLaunchCommandArgs "xxx"The server starts normally.
-
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Build out/index.js and reproduce the two commands from the issue, then inspect the CLI argument parsing for --matlabLaunchCommandArgs. Verify that values beginning with '-' are accepted and passed through like other strings, while the existing command continues to start normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100