summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoofar <toofar@spalge.com>2024-02-25 15:18:25 +1300
committertoofar <toofar@spalge.com>2024-02-25 15:56:34 +1300
commitae6826cc3ecb940f8cdac627916815e4538c4b6c (patch)
treef6c3d4cba893ca2cf7c2a68ba8fd0436ba1bfb4b
parent145bfe4de0802e7eb21ef902e8e53544e996d3a4 (diff)
downloadqutebrowser-ae6826cc3ecb940f8cdac627916815e4538c4b6c.tar.gz
qutebrowser-ae6826cc3ecb940f8cdac627916815e4538c4b6c.zip
ci: maybe fix --debug patching on all platforms
It seems `sed -i` is not very portable. Initially we were using this command: sed -i '' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py and then that started breaking on windows, I'm not sure why, with "can't read /.-d., .--debug.,/s/$/ default=True,/: No such file or directory". Then we changed to: sed -i '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py so without the extension argument, but that broke on mac with "1: "qutebrowser/qutebrowser.py": extra characters at the end of q command" then we tried: sed -i'' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py and that also broke on mac with the same error. On the recommendation of stackoverflow I just changed it no not use in-place editing and do a good old fashioned move afterwards. https://unix.stackexchange.com/questions/92895/how-can-i-achieve-portability-with-sed-i-in-place-editing
-rw-r--r--.github/workflows/nightly.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 400d65559..a78590de9 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -59,7 +59,8 @@ jobs:
- name: Patch qutebrowser for debugging
if: "contains(matrix.args, '--debug')"
run: |
- sed -i'' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py
+ sed '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py > qutebrowser/qutebrowser.py.tmp
+ mv qutebrowser/qutebrowser.py.tmp qutebrowser/qutebrowser.py
- name: Run tox
run: "tox -e ${{ matrix.toxenv }} -- --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}"
- name: Gather info