Delegate Click commands via subprocess instead of direct import
Some checks failed
CLI Tests / test-cli (push) Failing after 13s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m16s
Multi-Node Stress Testing / stress-test (push) Successful in 4s
Node Failover Simulation / failover-test (push) Successful in 6s
Security Scanning / security-scan (push) Successful in 1m16s
Some checks failed
CLI Tests / test-cli (push) Failing after 13s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m16s
Multi-Node Stress Testing / stress-test (push) Successful in 4s
Node Failover Simulation / failover-test (push) Successful in 6s
Security Scanning / security-scan (push) Successful in 1m16s
- Changed Click command delegation from importing aitbc_click() to subprocess call - Runs click_cli.py as separate process using sys.executable - Passes through command line arguments via sys.argv[1:] - Returns subprocess exit code to caller
This commit is contained in:
@@ -3194,9 +3194,11 @@ def main(argv=None):
|
||||
|
||||
# Check if this is a Click command
|
||||
if argv and argv[0] in CLICK_COMMANDS:
|
||||
# Delegate to Click CLI
|
||||
from cli.click_cli import aitbc_click
|
||||
aitbc_click()
|
||||
# Delegate to Click CLI by calling click_cli.py as a module
|
||||
import subprocess
|
||||
click_cli_path = Path("/opt/aitbc/cli/click_cli.py")
|
||||
result = subprocess.run([sys.executable, str(click_cli_path)] + sys.argv[1:])
|
||||
return result.returncode
|
||||
elif len(argv) > 0 and argv[0] == "genesis":
|
||||
# Run genesis CLI subprocess
|
||||
genesis_path = Path(__file__).parent.parent / "genesis" / "genesis_cli.py"
|
||||
|
||||
Reference in New Issue
Block a user