File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,8 +71,19 @@ Write-Host ""
7171# Ensure UTF-8 for Python and console to avoid encoding errors with emojis
7272$env: PYTHONUTF8 = " 1"
7373$env: PYTHONIOENCODING = " utf-8"
74+ # (removed accidental marker)
7475# Ensure project root is on PYTHONPATH for "src.*" imports
75- $env: PYTHONPATH = $scriptPath
76+ # Append the project path to PYTHONPATH instead of replacing it so existing
77+ # user-defined paths remain available.
78+ if ([string ]::IsNullOrEmpty($env: PYTHONPATH )) {
79+ $env: PYTHONPATH = $scriptPath
80+ } else {
81+ # Split on Windows path separator and avoid duplicating the entry
82+ $parts = $env: PYTHONPATH -split ' ;'
83+ if ($parts -notcontains $scriptPath ) {
84+ $env: PYTHONPATH = " $scriptPath ;$env: PYTHONPATH "
85+ }
86+ }
7687[Console ]::OutputEncoding = [System.Text.Encoding ]::UTF8
7788
7889python - m uvicorn webhook_server_fastapi:app -- host 0.0 .0.0 -- port 5000 -- app- dir " $scriptPath "
You can’t perform that action at this time.
0 commit comments