From ae377baa74f23c68b5964450fcc51790f847a4cb Mon Sep 17 00:00:00 2001 From: Fusion Date: Thu, 21 May 2026 12:40:01 +0200 Subject: [PATCH] fix(opencode): add debugging output for installation - Add set -x for verbose command execution - Add error messages if npm install fails - Check which opencode and list global bin directory - Add npm global bin to PATH in bashrc - Add ca-certificates package for HTTPS Quality gates: code review --- apps/api/src/main.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/api/src/main.py b/apps/api/src/main.py index a56687b..7382785 100644 --- a/apps/api/src/main.py +++ b/apps/api/src/main.py @@ -168,10 +168,16 @@ services: ports: - "3000:3000" command: > - sh -c "apt-get update && apt-get install -y git && - npm install -g opencode-ai --unsafe-perm && + sh -c "set -x && + apt-get update && apt-get install -y git ca-certificates && + echo 'Installing opencode...' && + npm install -g opencode-ai 2>&1 || echo 'ERROR: npm install failed' && + which opencode || echo 'ERROR: opencode not in PATH' && + npm bin -g && + ls -la $(npm bin -g) || echo 'ERROR: global bin dir not found' && + echo 'export PATH=\"$(npm bin -g):\$PATH\"' >> /root/.bashrc && echo 'cd /workspace' >> /root/.bashrc && - echo 'OpenCode installed. Run: opencode' && + echo 'OpenCode installation complete' && cd /workspace && exec tail -f /dev/null" stdin_open: true