Skip to content

Commit

Permalink
Avoid trying to source non-script files
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Nov 30, 2023
1 parent cb91393 commit 6747860
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ldnp/abstractpackager.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ def create_binary_script(script_path: str | os.PathLike, target_binary: str | os
f'script_dir="$APPDIR/apprun-hooks"',
f'if [ -d "$script_dir" ]; then',
' for script in "$script_dir"/*; do',
" # some plugins put non-script files in the directory"
" # we do our best to avoid running them by accident",
' [[ ! -f "$script" ]] && continue',
"",
" # shellcheck disable=SC1090",
' . "$script"',
" done",
Expand Down

0 comments on commit 6747860

Please sign in to comment.