This commit is contained in:
BalrajSinghGidda
2026-03-20 21:55:11 +05:30
parent 8de8d4e228
commit 30f61e7dc2

View File

@@ -1,20 +1,14 @@
{ pkgs }:
pkgs.github-copilot-cli.overrideAttrs (old: {
doInstallCheck = false;
postFixup = (old.postFixup or "") + ''
if [ -f "$out/bin/.copilot-wrapped" ]; then
echo "Patching copilot wrapper (binary-safe)..."
echo "Patching copilot wrapper to remove --no-warnings..."
tmpfile=$(mktemp)
# remove the offending flag safely
cat "$out/bin/.copilot-wrapped" \
| tr -d '\000' \
| sed 's/--no-warnings//g' \
> "$tmpfile"
chmod +x "$tmpfile"
mv "$tmpfile" "$out/bin/.copilot-wrapped"
# safer patch: don't mess with binary structure too much
sed -i 's/--no-warnings//g' "$out/bin/.copilot-wrapped" || true
fi
'';
})