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
Родитель 8f668dcd13
Коммит b657260fda
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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')