Skip to content

Commit 353a0a6

Browse files
committed
retain original argv (on Python 3.10+)
1 parent d4540ce commit 353a0a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gunicorn/arbiter.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ def __init__(self, app):
6868

6969
cwd = util.getcwd()
7070

71-
args = sys.argv[:]
72-
args.insert(0, sys.executable)
71+
if sys.version_info < (3, 10):
72+
args = sys.argv[:]
73+
args.insert(0, sys.executable)
74+
else:
75+
args = sys.orig_argv[:]
7376

7477
# init start context
7578
self.START_CTX = {

0 commit comments

Comments
 (0)