fix: ajuste no workflow para dist no npm#16
Merged
Conversation
…otection - Create safe-paths utility with platform-specific critical path detection - Support Windows (C:\, C:\Windows, C:\Program Files, etc) - Support macOS (/, /System, /Library, /Applications, etc) - Support Linux (/, /usr, /etc, /var, /root, etc) - Refactor install and update commands to use new utility - Add comprehensive test suite (11 tests covering all platforms) Fixes: POSIX path handling that failed on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces important safety improvements to the CLI install and update commands, preventing accidental operations in critical system directories. It also refactors the directory hashing logic in the conflict detector for improved reliability.
Critical system directory protection:
installCommandandupdateCommand(inapps/cli/src/commands/install.tsandapps/cli/src/commands/update.ts) to block execution if the current working directory is a critical system path (e.g./,/usr,/etc, etc.), with clear error messages for users. [1] [2]Codebase consistency:
projectRootafter introducing the new critical path check, ensuring that only the resolved and validated project root is used. [1] [2]Directory hashing reliability:
ConflictDetector(apps/cli/src/stash/conflict-detector.ts) to use Node'scryptomodule for generating a SHA-256 hash, ensuring consistent and secure hash values for directories.cryptomodule to support the new hashing implementation.