blob: 6a062374600a091b3ec08253ea0288469d54b46a [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io';
import 'package:fxtest/fxtest.dart';
Future<void> rebuildFuchsia(String fxLocation) async {
await Process.start(fxLocation, ['build'],
mode: ProcessStartMode.inheritStdio)
.then((Process process) async {
final _exitCode = await process.exitCode;
if (_exitCode != 0) {
throw BuildException('fx build', _exitCode);
}
});
}