fix(install): validate app before installing — refuse write-without-safety#137
Merged
Conversation
…afety aware app install now runs the same validation as aware app validate before copying any files. A write-mode node missing its required safety: block (E_APP_WRITE_WITHOUT_SAFETY) is surfaced at install time with the full issue list printed to stderr; nothing is written to ~/.aware on failure. Previously the invalid app installed cleanly and only failed much later at run pre-flight. Fixes #134
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.
What
aware app installnow refuses apps with validation errors — specifically write-mode nodes missing asafety:block — instead of installing them and failing at run time.Repro fixed
How
In
install(), before callinginstall_app_from_path(which copies files), the source manifest is loaded and passed throughvalidate_app+validate_app_safety— the same checksvalidate_cmdruns. If any errors are found, they are printed to stderr and the function returns early with an error. Nothing is written to~/.aware.Warnings don't block install (same policy as
validate— only errors do).Fixes #134