Skip to content

Commit c2f308f

Browse files
authoredJan 24, 2025
Fix issue All-Hands-AI#5620: [Bug]: Resolver fails when the existing requirements.txt does not end in a newline character (All-Hands-AI#6327)
1 parent a1f1c80 commit c2f308f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎.github/workflows/openhands-resolver.yml

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ jobs:
8484
run: |
8585
python -m pip index versions openhands-ai > openhands_versions.txt
8686
OPENHANDS_VERSION=$(head -n 1 openhands_versions.txt | awk '{print $2}' | tr -d '()')
87+
# Ensure requirements.txt ends with newline before appending
88+
if [ -f requirements.txt ] && [ -s requirements.txt ]; then
89+
sed -i -e '$a\' requirements.txt
90+
fi
8791
echo "openhands-ai==${OPENHANDS_VERSION}" >> requirements.txt
8892
cat requirements.txt
8993

0 commit comments

Comments
 (0)
Please sign in to comment.