fix: load environment variables before changing directories in testInteractive.js

- Add dotenv configuration with absolute path before changing working directory
- Ensures environment variables are loaded consistently regardless of working directory
- Fixes issue where SOLANA_RPC and other env vars were not available during adapter testing
This commit is contained in:
realshaman
2025-07-12 11:47:03 -06:00
parent 59666207ef
commit dc0f625b5e

View File

@@ -1,6 +1,10 @@
const inquirer = require('inquirer')
const childProcess = require('child_process')
inquirer.registerPrompt('fuzzypath', require('inquirer-fuzzy-path'))
// Load environment variables before changing directories
require('dotenv').config({ path: require('path').resolve(__dirname, '../../.env') })
console.log('Starting directory: ' + process.cwd());
const args = process.argv.slice(2); // The first two elements are 'node' and the script filename