langgenius / dify-sandbox

A lightweight, fast, and secure code execution environment that supports multiple programming languages
https://docs.dify.ai/development/backend/sandbox
Apache License 2.0
434 stars 97 forks source link

fix: symbolic links in python_lib_path directory are ignored #49

Closed tmokmss closed 2 months ago

tmokmss commented 2 months ago

closes #48

This PR adds -type l option to the find command used for listing all the targets in a source directory.

I confirmed this change fixes the original issue sucessfully without disruption.

Usecase: I want to add all the files in /usr/lib because many libraries require different shared libraries in the directory, and it is troublesome to add those files one by one.

tmokmss commented 2 months ago

@Yeuoly Hi, could you check this? This issue is more or less a blocker for us to use additional packages in Dify sandbox.

Yeuoly commented 2 months ago

I agree with that it could be a temporary solution for this, but once the symbol links are located out the range of the path, it may does not work.

tmokmss commented 2 months ago

Thanks! Yeah, at least sym links in the same directory are working, but we'll report you if we encountered any issue.