Skip to content

Commit 6747860

Browse files
committed
Avoid trying to source non-script files
1 parent cb91393 commit 6747860

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ldnp/abstractpackager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ def create_binary_script(script_path: str | os.PathLike, target_binary: str | os
169169
f'script_dir="$APPDIR/apprun-hooks"',
170170
f'if [ -d "$script_dir" ]; then',
171171
' for script in "$script_dir"/*; do',
172+
" # some plugins put non-script files in the directory"
173+
" # we do our best to avoid running them by accident",
174+
' [[ ! -f "$script" ]] && continue',
175+
"",
172176
" # shellcheck disable=SC1090",
173177
' . "$script"',
174178
" done",

0 commit comments

Comments
 (0)