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

Make SQL Tools settings recognise VS Code variables and environment variables. #857

Open
tony-brookes opened this issue Aug 17, 2021 · 0 comments
Labels
feature request New issue opened using "Feature request" template

Comments

@tony-brookes
Copy link

tony-brookes commented Aug 17, 2021

The various VS Code variables are not respected in SQL Tools settings. For instance if I want to set the folder where my SQL sessions should be stored I can't use ${workspaceFolder}/sql-sessions. If I do I get "Error cannot create directory /${workspaceFolder}/sql-sessions. Read only". This is because the code seems to just be taking what is in the configuration and whacking a / at the front of it (at least on Mac.). Having to hard code a folder in the workspace space creates a few challenges. For example, if using multiple machines to work on the same repository, synced via Git, the workspace folder might not be the same on both platforms. So syncing VS Code settings with hard coded paths will break if, for example, one machine is a Mac and one is a Windows box.

It would be great if this setting could reference VS Code variables, and if that is support then ${env:ENV_VAR} would be even better since I'm sure many people have a ton of environment variables set in their shells. Syncing settings would work far better because the folder will be correctly resolved on whatever machine a workspace is opened without any changes. One could simply add a setting in the User space to say that SQL Sessions should go in ${workspaceFolder}/sql-sessions and that would be that. :)

I've tried various ways to get around this but the fact that a / is pre-pended to whatever I enter and that the variables are just left in place means I can't find a way around the issue.

@tony-brookes tony-brookes added the feature request New issue opened using "Feature request" template label Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template
Projects
None yet
Development

No branches or pull requests

1 participant