question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parse variable references in `terminal.integrated.env.osx`

See original GitHub issue

Hi, there! 👋

The current recommendation for users of this plugin that wish to forward environment variables to the execution environment of dbt is to set terminal.integrated.env.{osx,linux,windows}. The problem is that the current implementation does not support variable references. With other words, this does not work:

{
    "terminal.integrated.env.osx": {
        "DBT_PROFILES_DIR": "${workspaceFolder}",
        "SOME_VARIABLE_USED_BY_DBT": "${env:SOME_VARIABLE_USED_BY_DBT}"
    }
}

This works for regular integrated terminals, so it is a divergence from the normal behavior of VS code.

An even better solution to this problem would be if terminal.integrated.inheritEnv is set to true, then dbt is executed in a terminal with the exact same environment variables as the host. Would that be possible? I think it might even make sense as the default behavior.

Thanks in advance, whatever you decide!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Lef-Fcommented, Feb 28, 2022

We’re having the same problem. This is such an awesome extension but we cannot use it because we are using a poetry Python environment install of dbt and maintain the profiles.yml file inside our dbt project. It would be amazing to support a simple configuration in e.g. settings.json.

0reactions
mdesmetcommented, Nov 12, 2022

Fixed in 0.8.9. Let me know if it works

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode - Not able to resue Env variables set inside terminal ...
In your user settings (File > Preferences > Settings), add the following: "terminal.integrated.allowWorkspaceConfiguration": true.
Read more >
VS Code Setting: terminal.integrated.env.osx - YouTube
Want to master VS Code? Click here: https://andrecasal.com/courses/mastery-for-vs-codeWant to upgrade web dev skills?
Read more >
Troubleshoot Terminal launch failures - Visual Studio Code
Troubleshoot Visual Studio Code Integrated Terminal launch failures. ... {platform} - Environment variables that will be added to the shell process.
Read more >
Dev Container metadata reference
A set of name-value pairs that sets or overrides environment variables for the devcontainer.json supporting service / tool (or sub-processes like terminals) but ......
Read more >
GNU make
6.1 Basics of Variable References; 6.2 The Two Flavors of Variables ... If the environment variable MAKEFILES is defined, make considers its ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found