Search code examples
visual-studio-codezshdbtzshrccmder

setting DBT_PROFILES_DIR in cmder


my team and I are upgrading to dbt 1.5. and I want the change of search-order for the dbt profile.yml file as easy as possible. For MacOS I successfully tested the solution of

echo "export DBT_PROFILES_DIR=~/.dbt" >> ~/.zshrc  

Unfortunately not all of us have a MacOS but they are using the cmder. Is there a way to make something similiar for the cmder config?

I should mention that this has to run in VS Code. I tried to change the vscode_init.cmd but it did not work.


Solution

  • The key is to set it as an environment variable.

    setx DBT_PROFILES_DIR C:\%your_path_here%\.dbt