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

Unified Diff: build/landmines.py

Issue 832933004: Prevent landmines.py from deleting your source directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make blank CHROMIUM_OUT_DIR fatal Created 5 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/landmines.py
diff --git a/build/landmines.py b/build/landmines.py
index 624c60788025214cdc4f3dff4a44ff25579c9fd3..97a250a149460e81027ab7b79840a1cbfcb0e190 100755
--- a/build/landmines.py
+++ b/build/landmines.py
@@ -44,11 +44,12 @@ def get_build_dir(build_tool, is_iphone=False):
if build_tool == 'xcode':
ret = os.path.join(SRC_DIR, 'xcodebuild')
elif build_tool in ['make', 'ninja', 'ninja-ios']: # TODO: Remove ninja-ios.
- if ('CHROMIUM_OUT_DIR' not in os.environ and
- 'output_dir' in landmine_utils.gyp_generator_flags()):
- output_dir = landmine_utils.gyp_generator_flags()['output_dir']
+ if 'CHROMIUM_OUT_DIR' in os.environ:
+ output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip()
+ if not output_dir:
+ raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!')
else:
- output_dir = os.environ.get('CHROMIUM_OUT_DIR', 'out')
+ output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out')
ret = os.path.join(SRC_DIR, output_dir)
else:
raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool)
« 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