Skip to content

Commit

Permalink
Export CLI_UPSTREAM vars to terminals (#1215)
Browse files Browse the repository at this point in the history
Export CLI_UPSTREAM vars to terminals
  • Loading branch information
ilia-db authored May 2, 2024
1 parent 53d0f2c commit 6915b4b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/databricks-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ export async function activate(
`${path.delimiter}${context.asAbsolutePath("./bin")}`
);

// Export CLI_UPSTREAM vars to the terminal to see if extension users use the CLI directly
context.environmentVariableCollection.replace(
"DATABRICKS_CLI_UPSTREAM",
"databricks-vscode-terminal"
);
context.environmentVariableCollection.replace(
"DATABRICKS_CLI_UPSTREAM_VERSION",
packageMetadata.version
);

// We always use bundled terraform and databricks provider.
// Updating environment collection means that the variables will be set in all terminals.
// If users use different CLI version in their terminal it will only pick the variables if
Expand Down

0 comments on commit 6915b4b

Please sign in to comment.