File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
33import platform
4+ import subprocess
45from pathlib import Path
56
67# User packages
@@ -52,10 +53,14 @@ def determine_user_pkg_paths():
5253 if platform .system () == 'Windows' :
5354 joined_pkg_paths = ";" .join (user_pkg_paths )
5455 env ['PYTHONPATH' ] = f'{ joined_pkg_paths } ;{ func_worker_dir } '
56+ # execve doesn't work in Windows: https://bugs.python.org/issue19124
57+ subprocess .run ([sys .executable ,
58+ '-m' , 'azure_functions_worker' ] + sys .argv [1 :],
59+ env = env )
5560 else :
5661 joined_pkg_paths = ":" .join (user_pkg_paths )
5762 env ['PYTHONPATH' ] = f'{ joined_pkg_paths } :{ func_worker_dir } '
58-
59- os . execve ( sys .executable ,
60- [ sys . executable , '-m' , 'azure_functions_worker' ] + sys .argv [1 :],
61- env )
63+ os . execve ( sys . executable ,
64+ [ sys .executable , '-m' , 'azure_functions_worker' ]
65+ + sys .argv [1 :],
66+ env )
You can’t perform that action at this time.
0 commit comments