From 578ca27f0191f54b9b03e909367936239be850df Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Sat, 28 Mar 2026 12:36:05 +0100 Subject: [PATCH] Fix build step directory handling - add better cd error handling and debugging --- .gitea/workflows/package-tests.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/package-tests.yml b/.gitea/workflows/package-tests.yml index 21947034..d7641a33 100644 --- a/.gitea/workflows/package-tests.yml +++ b/.gitea/workflows/package-tests.yml @@ -531,7 +531,18 @@ jobs: - name: Build Package run: | echo "=== BUILDING PYTHON PACKAGE ===" - cd /opt/aitbc/python-packages-workspace/repo/${{ matrix.package.path }} + echo "Current PWD before cd: $(pwd)" + + # Ensure we're in the correct directory + cd /opt/aitbc/python-packages-workspace/repo/${{ matrix.package.path }} || { + echo "❌ Failed to cd to package path, trying alternatives..." + cd /opt/aitbc/python-packages-workspace/repo || cd / || true + cd ${{ matrix.package.path }} 2>/dev/null || true + } + + echo "Current PWD after cd: $(pwd)" + echo "Directory contents:" + ls -la # For root-level packages (like aitbc-cli), use python build instead of poetry if [[ "${{ matrix.package.path }}" == "." ]]; then @@ -547,7 +558,11 @@ jobs: fi # Check build output - ls -la dist/ + ls -la dist/ 2>/dev/null || { + echo "❌ dist/ not found, checking current directory:" + ls -la + find . -name "dist" -type d 2>/dev/null || echo "No dist directory found" + } echo "✅ Python package built successfully"