mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-28 13:46:33 +00:00
Only cleanup temporary decompressed files in child-writer
Change-type: patch
This commit is contained in:
parent
1f138f0ecc
commit
48b5e8b9d9
@ -27,6 +27,7 @@ import {
|
|||||||
OnProgressFunction,
|
OnProgressFunction,
|
||||||
OnFailFunction,
|
OnFailFunction,
|
||||||
decompressThenFlash,
|
decompressThenFlash,
|
||||||
|
DECOMPRESSED_IMAGE_PREFIX,
|
||||||
} from 'etcher-sdk/build/multi-write';
|
} from 'etcher-sdk/build/multi-write';
|
||||||
import { cleanupTmpFiles } from 'etcher-sdk/build/tmp';
|
import { cleanupTmpFiles } from 'etcher-sdk/build/tmp';
|
||||||
import * as ipc from 'node-ipc';
|
import * as ipc from 'node-ipc';
|
||||||
@ -68,7 +69,7 @@ function log(message: string) {
|
|||||||
*/
|
*/
|
||||||
async function terminate(exitCode: number) {
|
async function terminate(exitCode: number) {
|
||||||
ipc.disconnect(IPC_SERVER_ID);
|
ipc.disconnect(IPC_SERVER_ID);
|
||||||
await cleanupTmpFiles(Date.now());
|
await cleanupTmpFiles(Date.now(), DECOMPRESSED_IMAGE_PREFIX);
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
process.exit(exitCode || SUCCESS);
|
process.exit(exitCode || SUCCESS);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user