Skip to content

Allow Setting the Port of externalServer to a String #256

@aarisr

Description

@aarisr

I have a file:
.vscode/settings.json
with the following content:

{
  "solargraph.externalServer": {
    "host": "localhost",
    "port": "${env:SOLARGRAPH_PORT}"
  },
  "solargraph.transport": "external",
}

I'd like to be able to set the Port from an ENV Variable, currently only String values can be created from ENV Variables.
But if I provide a String in the Settings the Code breaks with:

Failed to start Solargraph: RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received ${env:SOLARGRAPH_PORT}.

Could the value of "port" be casted to an integer so that this is possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions