vscode-sqltools icon indicating copy to clipboard operation
vscode-sqltools copied to clipboard

${userHome} variable not working in connections->database string.

Open wdawson opened this issue 11 months ago • 0 comments

When the ${userHome} variable is used to specify a database, it is interpreted as a literal string instead.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'settings.json`
  2. Create a connection like:
{
  "sqltools.connections": [
    {
      "driver": "SQLite",
      "name": "my-database",
      "database": "${userHome}/my-database.sqlite3"
    }
  ]
}
  1. Open the connection in the SQLTools tab under "Connections"
  2. See directory created under the workspace home, called "${userHome}" instead of evaluating the VS Code variable.

Expected behavior The ${userHome} variable should be evaluated rather than treated as a string literal.

Screenshots N/A

Desktop (please complete the following information):

  • SQLTools Version v0.28.3
  • VS Code Version: 1.93.1
  • OS: Mac
  • Driver:
    • [ ] PostgreSQL/Redshift
    • [ ] MySQL/MariaDB
    • [ ] MSSQL/Azure
    • [X] SQLite
    • [ ] Other? Which...
  • Database version: [e.g. MySQL v5.6, PostgreSQL vX...]

Additional context The ${workspaceFolder:Foobar} variable seems to work correctly.

wdawson avatar Jan 22 '25 23:01 wdawson