Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 5 tasks
wdawson opened this issue Jan 22, 2025 · 0 comments
Open
1 of 5 tasks

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

wdawson opened this issue Jan 22, 2025 · 0 comments
Labels

Comments

@wdawson
Copy link

wdawson commented Jan 22, 2025

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
    • SQLite
    • Other? Which...
  • Database version: [e.g. MySQL v5.6, PostgreSQL vX...]

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

@wdawson wdawson added the triage label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant