Skip to content

[Bug]: extensions.sh fails when no passed function hooks found #8278

Open
@ZoomRmc

Description

@ZoomRmc

What happened?

Recent run of Build All Artifacts action failed at the Prepare Info JSON and Matrices step, due to a subshell error 123 while running the extensions.sh script:

  [💥] Error  123 occurred in SUBSHELL [ SUBSHELL at /home/actions-runner-01/_work/os/os/build/lib/functions/general/extensions.sh:582 ]
  Error:  Error  123 occurred in SUBSHELL SUBSHELL at /home/actions-runner-01/_work/os/os/build/lib/functions/general/extensions.sh:582

From what I can see, xargs fails due to grep returning nothing. Not sure why, perhaps there are no passed arguments so there's no searched_hook_names to grep?

mapfile -t ext_list_dir < <(find "${ext_dir}" -maxdepth 2 -type f -name "*.sh" -print0 | xargs -0 grep -l "${grep_args[@]}")

The function is new and was introduced last week:
10570df

Possible mitigation step is appending || true to the subshell invocation at line 582 so it never fails. If lack of input arguments is indeed the issue, early enable_extensions_with_hostdeps_builtin_and_user return is preferable, of course.

How to reproduce?

https://github.com/armbian/os/actions/runs/15516597014/job/43684884037#annotation:10:80

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Ubuntu 24.04 Noble

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working as it shouldFrameworkFramework componentsGood first issueFeel free to contribute :)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions