File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,15 +24,17 @@ const TestDriverAgent = require('testdriverai');
2424/**
2525 * Load environment variables from the workspace .env file
2626 * This ensures testdriverai gets the correct environment variables from the user's workspace
27+ * Uses override: true to reload variables even if they already exist in process.env
2728 */
2829function loadWorkspaceEnv ( workspaceFolder : vscode . WorkspaceFolder ) : void {
2930 const workspaceEnvPath = path . join ( workspaceFolder . uri . fsPath , '.env' ) ;
3031 try {
31- const envResult = dotenv . config ( { path : workspaceEnvPath } ) ;
32+ // Use override: true to force reload of environment variables even if they already exist
33+ const envResult = dotenv . config ( { path : workspaceEnvPath , override : true } ) ;
3234 if ( envResult . error ) {
3335 console . log ( 'No .env file found in workspace folder or error loading it:' , envResult . error . message ) ;
3436 } else {
35- console . log ( 'Successfully loaded .env file from workspace folder' ) ;
37+ console . log ( 'Successfully loaded .env file from workspace folder (with override) ' ) ;
3638 // Log the TestDriver-specific environment variables that were loaded
3739 const tdVars = Object . keys ( process . env ) . filter ( key => key . startsWith ( 'TD_' ) ) ;
3840 if ( tdVars . length > 0 ) {
Original file line number Diff line number Diff line change 1+ steps :
2+ - commands :
3+ - command : assert
4+ expect : windows is launched
You can’t perform that action at this time.
0 commit comments