fix: collapse python3 binary patch to single line

Docker parses each new line in a RUN command as a potential instruction.
The multi-line python3 -c "..." caused 'unknown instruction: data' errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 06:59:26 +01:00
parent 4d4e6cba75
commit c6097b1b6e

View File

@@ -45,15 +45,7 @@ RUN curl -fsSL "https://apps.purevpn-tools.com/cross-platform/linux-daemon/1.4.1
-o /opt/purevpn-cli/pured-linux-x64.gz \
&& gzip -d /opt/purevpn-cli/pured-linux-x64.gz \
&& chmod +x /opt/purevpn-cli/pured-linux-x64
RUN python3 -c "
data = open('/opt/purevpn-cli/bin/purevpn-cli','rb').read()
old = b'cross-platform/linux-cli/production/pured-linux-x64.gz'
new = b'cross-platform/linux-daemon/1.4.1/pured-linux-x64.gz?x'
assert len(old)==len(new), f'{len(old)} vs {len(new)}'
n = data.count(old); assert n > 0, 'pattern not found'
open('/opt/purevpn-cli/bin/purevpn-cli','wb').write(data.replace(old,new))
print(f'Patched {n} occurrence(s)')
"
RUN python3 -c "data=open('/opt/purevpn-cli/bin/purevpn-cli','rb').read();old=b'cross-platform/linux-cli/production/pured-linux-x64.gz';new=b'cross-platform/linux-daemon/1.4.1/pured-linux-x64.gz?x';assert len(old)==len(new),f'{len(old)} vs {len(new)}';n=data.count(old);assert n>0,'pattern not found';open('/opt/purevpn-cli/bin/purevpn-cli','wb').write(data.replace(old,new));print(f'Patched {n} occurrence(s)')"
# ── Fake systemctl (pured.service) ───────────────────────────────────────────
# purevpn-cli checks `systemctl is-active pured.service` to detect missing