Skip to content

Commit

Permalink
Fix issue All-Hands-AI#5620: [Bug]: Resolver fails when the existing …
Browse files Browse the repository at this point in the history
…requirements.txt does not end in a newline character (All-Hands-AI#6327)
  • Loading branch information
openhands-agent authored Jan 24, 2025
1 parent a1f1c80 commit c2f308f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/openhands-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ jobs:
run: |
python -m pip index versions openhands-ai > openhands_versions.txt
OPENHANDS_VERSION=$(head -n 1 openhands_versions.txt | awk '{print $2}' | tr -d '()')
# Ensure requirements.txt ends with newline before appending
if [ -f requirements.txt ] && [ -s requirements.txt ]; then
sed -i -e '$a\' requirements.txt
fi
echo "openhands-ai==${OPENHANDS_VERSION}" >> requirements.txt
cat requirements.txt
Expand Down

0 comments on commit c2f308f

Please sign in to comment.