Graceful rimraf in updater

This commit is contained in:
Fedor Indutny 2023-03-02 09:57:36 -08:00 committed by GitHub
parent c488b626bf
commit 1e7d658109
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 39 deletions

View file

@ -17,6 +17,7 @@ import {
getTempDir,
deleteTempDir,
} from '../../updater/common';
import * as log from '../../logging/log';
describe('updater/signatures', () => {
const windows = parseYaml(`version: 1.23.2
@ -164,7 +165,7 @@ releaseDate: '2021-12-03T19:00:23.754Z'
const dir = await createTempDir();
assert.isTrue((await stat(dir)).isDirectory());
await deleteTempDir(dir);
await deleteTempDir(log, dir);
assert.isFalse(await pathExists(dir), 'Directory should be deleted');
});
@ -181,7 +182,7 @@ releaseDate: '2021-12-03T19:00:23.754Z'
await mkdir(dir);
await deleteTempDir(dir);
await deleteTempDir(log, dir);
assert.isFalse(await pathExists(dir), 'Directory should be deleted');
});