Merge pull request #1488 from balena-io/fix-sync-without-container

Don't require an existing supervisor container to sync
This commit is contained in:
bulldozer-balena[bot] 2020-10-13 09:54:04 +00:00 committed by GitHub
commit d61e33e85d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,8 +59,12 @@ export async function getDeviceArch(docker: Docker): Promise<string> {
} }
export async function getCacheFrom(docker: Docker): Promise<string[]> { export async function getCacheFrom(docker: Docker): Promise<string[]> {
const container = await getSupervisorContainer(docker); try {
return [container.Image]; const container = await getSupervisorContainer(docker);
return [container.Image];
} catch {
return [];
}
} }
// perform the build and return the image id // perform the build and return the image id