fix(skills): share deleted-upstream denylist between Nix and rebuild
This commit is contained in:
1 parent
72a23ff0d0
commit
e4c67f0080
8 files changed
+159
-2
No files matched your search
+8
-2
@@ -13,6 +13,8 @@
|
||||
# A failed switch stops the script before post-switch updates.
|
||||
set -euo pipefail
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
# Shared with home.nix: skills deleted upstream must stay out of the CLI update.
|
||||
DENYLIST="$DIR/deleted-upstream-skills.txt"
|
||||
ln -sfn "$DIR" ~/.dotfiles
|
||||
NPM=/opt/homebrew/bin/npm
|
||||
|
||||
@@ -205,15 +207,19 @@ if [ ! -x "$NPX" ]; then
|
||||
echo "==> WARNING: $NPX not found. Skipping agent skill update."
|
||||
elif [ ! -f "$SKILL_LOCK" ]; then
|
||||
echo "==> WARNING: $SKILL_LOCK not found. Skipping agent skill update."
|
||||
elif [ ! -f "$DENYLIST" ]; then
|
||||
echo "==> WARNING: $DENYLIST not found. Skipping agent skill update."
|
||||
else
|
||||
skill_names="$(/usr/bin/python3 - "$SKILL_LOCK" 2>/dev/null <<'PY' || true
|
||||
skill_names="$(/usr/bin/python3 - "$SKILL_LOCK" "$DENYLIST" 2>/dev/null <<'PY' || true
|
||||
import json
|
||||
import sys
|
||||
|
||||
with open(sys.argv[1]) as lock_file:
|
||||
skills = json.load(lock_file).get("skills", {})
|
||||
with open(sys.argv[2]) as deny_file:
|
||||
denied = {line.strip() for line in deny_file if line.strip()}
|
||||
for name in sorted(skills):
|
||||
if name != "security-audit":
|
||||
if name != "security-audit" and name not in denied:
|
||||
print(name)
|
||||
PY
|
||||
)"
|
||||
|
||||
Reference in new issue
Block a user