fix: add sys.path setup in core/main.py for aitbc_cli imports
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- Added sys.path.insert(0, str(CLI_DIR)) where CLI_DIR is /opt/aitbc/cli - Ensures aitbc_cli package is importable from core/main.py - Fixes No module named 'aitbc_cli.core' error - core/ and aitbc_cli/ are siblings, so core/main.py needs explicit path setup
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
AITBC CLI - Fixed version with modular command groups
|
||||
"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Ensure parent directory is on path for aitbc_cli imports
|
||||
CLI_DIR = Path(__file__).parent.parent
|
||||
if str(CLI_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(CLI_DIR))
|
||||
|
||||
import click
|
||||
|
||||
# Import modular command groups
|
||||
|
||||
Reference in New Issue
Block a user