GitNexus/gitnexus/scripts
Copilot 7a5ab57bd3
fix: add preinstall cleanup to prevent ENOTEMPTY on global upgrade (#843)
* Initial plan

* fix: add preinstall cleanup for vendor/tree-sitter-proto to prevent ENOTEMPTY on upgrade

When upgrading gitnexus globally, npm may fail with ENOTEMPTY because it
cannot cleanly remove node_modules/ and build/ directories that a previous
installation's file: dependency resolution created inside
vendor/tree-sitter-proto/.

Add a preinstall script that removes those leftover directories before npm
resolves dependencies. Also add .npmignore entries for vendor build artifacts
as a belt-and-suspenders measure.

Fixes #836

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/8b7c1fdd-0c20-4cf4-a64a-9e9d1c0b20ed

Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>

* fix: log warnings in preinstall cleanup catch block

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/8b7c1fdd-0c20-4cf4-a64a-9e9d1c0b20ed

Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
2026-04-15 14:10:49 +01:00
..
build.js fix: ensure import rewrites survive npm publish lifecycle 2026-04-01 17:28:14 +05:30
patch-tree-sitter-swift.cjs fix: restore tree-sitter-swift postinstall patch for macOS ARM64 (#788) 2026-04-11 18:24:02 +01:00
preinstall-cleanup.cjs fix: add preinstall cleanup to prevent ENOTEMPTY on global upgrade (#843) 2026-04-15 14:10:49 +01:00