Merge "Require cargo_bin option" am: 9f75e2c9bc am: 65ba5606c1 am: a5b4fb5f79 am: 838af55a74
Original change: https://android-review.googlesource.com/c/platform/development/+/1977686 Change-Id: I778a0c61fe62c850fc063b0c3f2743e67f943298
This commit is contained in:
@@ -1152,8 +1152,14 @@ class Runner(object):
|
||||
self.cargo_path = os.path.join(self.args.cargo_bin, 'cargo')
|
||||
if not os.path.isfile(self.cargo_path):
|
||||
sys.exit('ERROR: cannot find cargo in ' + self.args.cargo_bin)
|
||||
print('WARNING: using cargo in ' + self.args.cargo_bin)
|
||||
print('INFO: using cargo in ' + self.args.cargo_bin)
|
||||
return
|
||||
elif os.environ.get('ANDROID_BUILD_ENVIRONMENT_CONFIG', '') == 'googler':
|
||||
sys.exit('ERROR: Not executed within the sandbox. Please see '
|
||||
'go/cargo2android-sandbox for more information.')
|
||||
else:
|
||||
sys.exit('ERROR: the prebuilt cargo is not usable; please '
|
||||
'use the --cargo_bin flag.')
|
||||
# We have only tested this on Linux.
|
||||
if platform.system() != 'Linux':
|
||||
sys.exit('ERROR: this script has only been tested on Linux with cargo.')
|
||||
|
||||
Reference in New Issue
Block a user