Skip to content

Commit 5609149

Browse files
pwt-cdclaude
andcommitted
FIX: Add Pygments verification and minted directory permissions for Docker
- Verify Pygments availability (pygmentize command or python3 module) before LaTeX compilation - Create _minted cache directory with proper 755 permissions for Docker containers - Ensure minted can write syntax highlighting files in containerized environments - Maintain compatibility with both local (TeX Live 2025) and Docker (TeX Live 2021) environments Tested locally - build completes successfully with Pygments verification and permissions setup 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 234246a commit 5609149

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

drafts/current/specifications/build.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ cleanup_latex_files() {
242242
rm -rf build/_minted
243243
fi
244244

245+
# Ensure _minted directory exists with correct permissions for Docker
246+
mkdir -p build/_minted
247+
chmod 755 build/_minted
248+
echo " Created _minted cache directory with proper permissions"
249+
245250
print_success " ✅ Intermediate files cleaned"
246251
fi
247252
}
@@ -320,8 +325,22 @@ except Exception as e:
320325
build_pdf() {
321326
print_status "📄 Step 3: Building PDF documentation..."
322327

323-
# Create output directory
328+
# Create output directory with proper permissions for Docker
324329
mkdir -p build
330+
chmod 755 build
331+
332+
# Verify Pygments is available for minted
333+
if command -v pygmentize &> /dev/null; then
334+
echo " Pygments available at: $(which pygmentize)"
335+
else
336+
print_warning "⚠️ pygmentize command not found, checking for python3 -m pygments"
337+
if python3 -c "import pygments; print('Pygments version:', pygments.__version__)" 2>/dev/null; then
338+
echo " Pygments Python module available"
339+
else
340+
print_error "❌ Pygments not available - minted syntax highlighting will fail"
341+
exit 1
342+
fi
343+
fi
325344

326345
# Clean intermediate files before building
327346
cleanup_latex_files

0 commit comments

Comments
 (0)