subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def ask_orchestrator(prompt, target_binary="opencode"): # First, try to find the binary in PATH, then fallback to user home opencode_path = subprocess.run(["which", target_binary], capture_output=True, text=True).stdout.strip() if not opencode_path: opencode_path = os.path.expanduser("~/.opencode/bin/opencode")- Confidence
- 79% confidence
- Finding
- opencode_path = subprocess.run(["which", target_binary], capture_output=True, text=True).stdout.strip()
