only request sky_snapshot if it is actually needed (#8340)

This commit is contained in:
Michael Goderbauer 2017-02-22 13:55:58 -08:00 committed by GitHub
parent fc9a00fd6c
commit 28a2b99989

View File

@ -88,7 +88,6 @@ Future<Null> build({
bool includeRobotoFonts: true,
bool reportLicensedPackages: false
}) async {
snapshotterPath ??= artifacts.getArtifactPath(Artifact.skySnapshot);
outputPath ??= defaultFlxOutputPath;
kernelPath ??= defaultKernelPath;
snapshotPath ??= defaultSnapshotPath;
@ -111,7 +110,7 @@ Future<Null> build({
// In a precompiled snapshot, the instruction buffer contains script
// content equivalents
int result = await createSnapshot(
snapshotterPath: snapshotterPath,
snapshotterPath: snapshotterPath ?? artifacts.getArtifactPath(Artifact.skySnapshot),
mainPath: mainPath,
snapshotPath: snapshotPath,
depfilePath: depfilePath,