1
0

fix: improve script execution logic by eliminating subshell in setup.sh

This commit is contained in:
2025-08-04 22:32:33 -05:00
parent 08d78590bc
commit 50b80609d4

View File

@@ -25,8 +25,8 @@ if [ -d "$DOTFILES_DIR/scripts" ]; then
script_count=0
# Find all numbered scripts and run them in order
find "$DOTFILES_DIR/scripts" -name '[0-9][0-9]-*.sh' -type f | sort | while read -r script; do
# Find all numbered scripts and run them in order (no subshell)
while read -r script; do
script_name=$(basename "$script")
log_info "Running $script_name..."
@@ -38,7 +38,7 @@ if [ -d "$DOTFILES_DIR/scripts" ]; then
fi
((script_count++))
done
done < <(find "$DOTFILES_DIR/scripts" -name '[0-9][0-9]-*.sh' -type f | sort)
if [ $script_count -eq 0 ]; then
log_warning "No numbered scripts found in scripts/ directory"