Skip to content

Commit 6915b4b

Browse files
authored
Export CLI_UPSTREAM vars to terminals (#1215)
Export CLI_UPSTREAM vars to terminals
1 parent 53d0f2c commit 6915b4b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/databricks-vscode/src/extension.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,16 @@ export async function activate(
183183
`${path.delimiter}${context.asAbsolutePath("./bin")}`
184184
);
185185

186+
// Export CLI_UPSTREAM vars to the terminal to see if extension users use the CLI directly
187+
context.environmentVariableCollection.replace(
188+
"DATABRICKS_CLI_UPSTREAM",
189+
"databricks-vscode-terminal"
190+
);
191+
context.environmentVariableCollection.replace(
192+
"DATABRICKS_CLI_UPSTREAM_VERSION",
193+
packageMetadata.version
194+
);
195+
186196
// We always use bundled terraform and databricks provider.
187197
// Updating environment collection means that the variables will be set in all terminals.
188198
// If users use different CLI version in their terminal it will only pick the variables if

0 commit comments

Comments
 (0)