File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -124,4 +124,14 @@ def run(self):
124124 # This has already been validated inside __init__
125125 os .environ ['SENTRY_SKIP_BACKEND_VALIDATION' ] = '1'
126126
127+ # Look up the bin directory where `sentry` exists, which should be
128+ # sys.argv[0], then inject that to the front of our PATH so we can reliably
129+ # find the `uwsgi` that's installed when inside virtualenv.
130+ # This is so the virtualenv doesn't need to be sourced in, which effectively
131+ # does exactly this.
132+ virtualenv_path = os .path .dirname (os .path .abspath (sys .argv [0 ]))
133+ current_path = os .environ .get ('PATH' , '' )
134+ if virtualenv_path not in current_path :
135+ os .environ ['PATH' ] = '%s:%s' % (virtualenv_path , current_path )
136+
127137 os .execvp ('uwsgi' , ('uwsgi' ,))
You can’t perform that action at this time.
0 commit comments