This commit is contained in:
BalrajSinghGidda
2026-03-20 21:52:37 +05:30
parent cf310da3da
commit 8de8d4e228

View File

@@ -1,11 +1,20 @@
{ pkgs, ... }:
{ pkgs }:
pkgs.github-copilot-cli.overrideAttrs (old: {
postFixup = (old.postFixup or "") + ''
if [ -f "$out/bin/.copilot-wrapped" ]; then
echo "Patching copilot wrapper to remove --no-warnings..."
substituteInPlace "$out/bin/.copilot-wrapped" \
--replace "--no-warnings" ""
echo "Patching copilot wrapper (binary-safe)..."
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"
fi
'';
})