File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,13 @@ def determine_user_pkg_paths():
53
53
func_worker_dir = str (Path (__file__ ).absolute ().parent )
54
54
env = os .environ
55
55
56
- if is_azure_environment ():
57
- user_pkg_paths = determine_user_pkg_paths ()
58
- joined_pkg_paths = os .pathsep .join (user_pkg_paths )
56
+ # Setting up python path for all environments to prioritize
57
+ # third-party user packages over worker packages in PYTHONPATH
58
+ user_pkg_paths = determine_user_pkg_paths ()
59
+ joined_pkg_paths = os .pathsep .join (user_pkg_paths )
60
+ env ['PYTHONPATH' ] = f'{ joined_pkg_paths } :{ func_worker_dir } '
59
61
60
- # On cloud, we prioritize third-party user packages
61
- # over worker packages in PYTHONPATH
62
- env ['PYTHONPATH' ] = f'{ joined_pkg_paths } :{ func_worker_dir } '
62
+ if is_azure_environment ():
63
63
os .execve (sys .executable ,
64
64
[sys .executable , '-m' , 'azure_functions_worker' ]
65
65
+ sys .argv [1 :],
You can’t perform that action at this time.
0 commit comments