Skip to content

Commit f1fe4a2

Browse files
committed
chmod tmp dir before cleanup
This should fix any permissions errors we get due to the ZIP file containing files with different permissions.
1 parent be40598 commit f1fe4a2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

extensions/ql-vscode/test/unit-tests/common/unzip.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createHash } from "crypto";
22
import { open } from "fs/promises";
33
import { join, relative, resolve, sep } from "path";
4-
import { pathExists, readdir } from "fs-extra";
4+
import { chmod, pathExists, readdir } from "fs-extra";
55
import { dir, DirectoryResult } from "tmp-promise";
66
import {
77
excludeDirectories,
@@ -98,6 +98,10 @@ describe("unzipToDirectory", () => {
9898
});
9999

100100
afterEach(async () => {
101+
for await (const file of walkDirectory(tmpDir.path)) {
102+
await chmod(file, 0o777);
103+
}
104+
101105
await tmpDir?.cleanup();
102106
});
103107

0 commit comments

Comments
 (0)