Bug 1129394 - produce a useful error message for |mach build-backend| without having run configure; r=ted.mielczarek

Checking for config.status ourselves avoids the unpleasant situation of
the subprocess module checking for us and producing a cryptic error
message.
This commit is contained in:
Nathan Froyd 2015-02-04 08:40:56 -05:00
parent da06a8acb4
commit 4ea01de4ca

View File

@ -586,6 +586,12 @@ class Build(MachCommandBase):
python = self.virtualenv_manager.python_path
config_status = os.path.join(self.topobjdir, 'config.status')
if not os.path.exists(config_status):
print('config.status not found. Please run |mach configure| '
'or |mach build| prior to building the %s build backend.'
% backend)
return 1
args = [python, config_status, '--backend=%s' % backend]
if diff:
args.append('--diff')