Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Side by Side Diff: build/android/gyp/lint.py

Issue 2558183002: Fix system env being overriden with empty env in lint.py (Closed)
Patch Set: Fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs Android's lint tool.""" 7 """Runs Android's lint tool."""
8 8
9 9
10 import argparse 10 import argparse
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 # sibling res/ and src/ directories (which should be pass explicitly if they 163 # sibling res/ and src/ directories (which should be pass explicitly if they
164 # are to be included). 164 # are to be included).
165 if manifest_path: 165 if manifest_path:
166 os.symlink(os.path.abspath(manifest_path), 166 os.symlink(os.path.abspath(manifest_path),
167 os.path.join(project_dir, 'AndroidManifest.xml')) 167 os.path.join(project_dir, 'AndroidManifest.xml'))
168 cmd.append(project_dir) 168 cmd.append(project_dir)
169 169
170 if os.path.exists(result_path): 170 if os.path.exists(result_path):
171 os.remove(result_path) 171 os.remove(result_path)
172 172
173 env = {} 173 env = os.environ.copy()
174 stderr_filter = None 174 stderr_filter = None
175 if cache_dir: 175 if cache_dir:
176 env['_JAVA_OPTIONS'] = '-Duser.home=%s' % _RebasePath(cache_dir) 176 env['_JAVA_OPTIONS'] = '-Duser.home=%s' % _RebasePath(cache_dir)
177 # When _JAVA_OPTIONS is set, java prints to stderr: 177 # When _JAVA_OPTIONS is set, java prints to stderr:
178 # Picked up _JAVA_OPTIONS: ... 178 # Picked up _JAVA_OPTIONS: ...
179 # 179 #
180 # We drop all lines that contain _JAVA_OPTIONS from the output 180 # We drop all lines that contain _JAVA_OPTIONS from the output
181 stderr_filter = lambda l: re.sub(r'.*_JAVA_OPTIONS.*\n?', '', l) 181 stderr_filter = lambda l: re.sub(r'.*_JAVA_OPTIONS.*\n?', '', l)
182 182
183 try: 183 try:
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 silent=args.silent), 357 silent=args.silent),
358 args, 358 args,
359 input_paths=input_paths, 359 input_paths=input_paths,
360 input_strings=input_strings, 360 input_strings=input_strings,
361 output_paths=output_paths, 361 output_paths=output_paths,
362 depfile_deps=classpath) 362 depfile_deps=classpath)
363 363
364 364
365 if __name__ == '__main__': 365 if __name__ == '__main__':
366 sys.exit(main()) 366 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698