mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
fix(array-objects): Fix schema lookup, reindexing, and disable file upload
Address PR review feedback for array-of-objects helpers: 1. Schema resolution: Use getSchemaProperty() instead of manual traversal - Fixes nested array-of-objects schema lookup (e.g., news.custom_feeds) - Now properly descends through .properties for nested objects 2. Reindexing: Replace brittle regex with targeted patterns - Only replace index in bracket notation [0], [1], etc. for names - Only replace _item_<digits> pattern for IDs (not arbitrary digits) - Use specific function parameter patterns for onclick handlers - Prevents corruption of fieldId, pluginId, or other numeric values 3. File upload: Disable widget until properly implemented - Hide/disable upload button with clear message - Show existing logos if present but disable upload functionality - Prevents silent failures when users attempt to upload files - Added TODO comments for future implementation Also fixes exit code handling in one-shot-install.sh to properly capture first_time_install.sh exit status before error trap fires.
This commit is contained in:
@@ -343,14 +343,16 @@ main() {
|
||||
echo ""
|
||||
|
||||
# Execute with proper error handling
|
||||
# Temporarily disable errexit to capture exit code instead of exiting immediately
|
||||
set +e
|
||||
# Use sudo if we're not root, otherwise run directly
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
bash ./first_time_install.sh
|
||||
else
|
||||
sudo bash ./first_time_install.sh
|
||||
fi
|
||||
|
||||
INSTALL_EXIT_CODE=$?
|
||||
set -e # Re-enable errexit
|
||||
|
||||
if [ $INSTALL_EXIT_CODE -eq 0 ]; then
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user