bypass root check in patch scripts

This commit is contained in:
Robin Appelman 2024-12-09 18:53:54 +01:00
commit 2cb8f30983

View file

@ -8,6 +8,11 @@ writeShellApplication {
runtimeInputs = [jq]; runtimeInputs = [jq];
text = '' text = ''
bash "$1" -j tmpscript=$(mktemp)
trap 'rm -f "$tmpscript"' EXIT
cp "$1" "$tmpscript"
# bypass "root check"
sed -i 's/ne 0/eq 0/' "$tmpscript"
bash "$tmpscript" -j
''; '';
} }