Merge pull request #1078 from balena-io/flash-compressed-images

Support compressed images in `balena local flash`
This commit is contained in:
Alexis Svinartchouk 2019-01-16 15:12:03 +01:00 committed by GitHub
commit 0fd0b6e1fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,10 +93,11 @@ export const flash: CommandDefinition<
process.exit(0); process.exit(0);
} }
const source = new sourceDestination.File( const file = new sourceDestination.File(
params.image, params.image,
sourceDestination.File.OpenFlags.Read, sourceDestination.File.OpenFlags.Read,
); );
const source = await file.getInnerSource();
const progressBars: { [key: string]: any } = { const progressBars: { [key: string]: any } = {
flashing: new visuals.Progress('Flashing'), flashing: new visuals.Progress('Flashing'),