Skip to content

Commit

Permalink
Update config.ng.functions.sh
Browse files Browse the repository at this point in the history
fix: 2nd , Cannot iterate over null (null)
  • Loading branch information
Tearran authored Sep 5, 2024
1 parent 59bd9c3 commit b939e50
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/armbian-configng/config.ng.functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,14 @@ module_options+=(
#
function execute_command() {
local id=$1
local commands=$(jq -r --arg id "$id" '.menu[] | .. | objects | select(.id==$id) | .command[]' "$json_file")
#local commands=$(jq -r --arg id "$id" '.menu[] | .. | objects | select(.id==$id) | .command[]' "$json_file")
local commands=$(jq -r --arg id "$id" '
.menu[] |
.. |
objects |
select(.id == $id) |
.command[]?' "$json_file")

for command in "${commands[@]}"; do
# Check if the command is not in the list of restricted commands
[[ -n "$debug" ]] && echo "$command"
Expand Down

0 comments on commit b939e50

Please sign in to comment.