-
Notifications
You must be signed in to change notification settings - Fork 14
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.