Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions containers/agent/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ AWFEOF
echo "[entrypoint] Adding CARGO_HOME/bin to PATH: ${AWF_CARGO_HOME}/bin"
echo "export PATH=\"${AWF_CARGO_HOME}/bin:\$PATH\"" >> "/host${SCRIPT_FILE}"
echo "export CARGO_HOME=\"${AWF_CARGO_HOME}\"" >> "/host${SCRIPT_FILE}"
else
# Fallback: detect Cargo from default location if CARGO_HOME not provided
# This ensures Rust binaries work even when CARGO_HOME env var is not set
echo "# Add Cargo bin for Rust if it exists (fallback when CARGO_HOME not provided)" >> "/host${SCRIPT_FILE}"
echo "[ -d \"\$HOME/.cargo/bin\" ] && export PATH=\"\$HOME/.cargo/bin:\$PATH\"" >> "/host${SCRIPT_FILE}"
Comment on lines +296 to +300
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new fallback branch for Rust/Cargo PATH resolution isn’t currently exercised by CI: test-chroot.yml explicitly sets CARGO_HOME and adds $CARGO_HOME/bin to PATH, so AWF_CARGO_HOME is always present and this else-path won’t be covered. Consider adding an integration test (or a CI job variant) that runs chroot with CARGO_HOME unset and PATH not containing ~/.cargo/bin, then asserts rustc --version succeeds to prevent regressions.

Copilot uses AI. Check for mistakes.
fi
# Add JAVA_HOME/bin to PATH if provided (for Java on GitHub Actions)
# Also set LD_LIBRARY_PATH to include Java's lib directory for libjli.so
Expand Down