@@ -105,16 +105,15 @@ def construct_result_handler(self, buildaction, report_output,
105
105
def analyze (self , analyzer_cmd , res_handler , proc_callback = None , env = None ):
106
106
"""
107
107
Run the analyzer.
108
+ Don't specify the env unless really needed!
109
+ The package internal or original env will be selected
110
+ based on the location of the called binary.
108
111
"""
109
112
LOG .debug ('Running analyzer ...' )
110
113
111
114
LOG .debug_analyzer ('\n %s' ,
112
115
' ' .join ([shlex .quote (x ) for x in analyzer_cmd ]))
113
116
114
- if not env :
115
- env = analyzer_context .get_context ().get_env_for_bin (
116
- analyzer_cmd [0 ])
117
-
118
117
res_handler .analyzer_cmd = analyzer_cmd
119
118
try :
120
119
ret_code , stdout , stderr \
@@ -149,6 +148,10 @@ def run_proc(command, cwd=None, proc_callback=None, env=None):
149
148
"""
150
149
Just run the given command and return the return code
151
150
and the stdout and stderr outputs of the process.
151
+
152
+ Don't specify the env unless really needed!
153
+ The package internal or original env will be selected
154
+ based on the location of the called binary.
152
155
"""
153
156
154
157
def signal_handler (signum , _ ):
@@ -161,6 +164,10 @@ def signal_handler(signum, _):
161
164
162
165
signal .signal (signal .SIGINT , signal_handler )
163
166
167
+ if not env :
168
+ env = analyzer_context .get_context ().get_env_for_bin (
169
+ command [0 ])
170
+
164
171
LOG .debug ('\n executing:%s\n ' , command )
165
172
LOG .debug ('\n ENV:\n ' )
166
173
LOG .debug (env )
0 commit comments