mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Fix issue #5620: [Bug]: Resolver fails when the existing requirements.txt does not end in a newline character (#6327)
This commit is contained in:
4
.github/workflows/openhands-resolver.yml
vendored
4
.github/workflows/openhands-resolver.yml
vendored
@@ -84,6 +84,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip index versions openhands-ai > openhands_versions.txt
|
python -m pip index versions openhands-ai > openhands_versions.txt
|
||||||
OPENHANDS_VERSION=$(head -n 1 openhands_versions.txt | awk '{print $2}' | tr -d '()')
|
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
|
echo "openhands-ai==${OPENHANDS_VERSION}" >> requirements.txt
|
||||||
cat requirements.txt
|
cat requirements.txt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user