💚 HTTP has \r\n line endings

So we need to strip \r, \n already gets taken care of
by the whole pipe. Also limit to first location header
just in case.
This commit is contained in:
Gina Häußge committed 2023-01-18 17:38:26 +01:00
1 parent c5b56ae11b
commit 68191cfbf4
1 file changed
+1 -1
+1 -1
View File
@@ -56,7 +56,7 @@ jobs:
steps:
- name: 👀 Determine latest release
run: |
OCTOPRINT_VERSION=$(curl -i https://github.com/OctoPrint/OctoPrint/releases/latest | grep -i location: | awk -F/ '{print $NF}' | tr -d '\n')
OCTOPRINT_VERSION=$(curl -i https://github.com/OctoPrint/OctoPrint/releases/latest | grep -i location: | head -n1 | awk -F/ '{print $NF}' | tr -d '\r')
echo "OCTOPRINT_VERSION=$OCTOPRINT_VERSION" >> $GITHUB_ENV
- name: 🐍 Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4