Actually run the top level await
This commit is contained in:
parent
a787215c95
commit
1a9f6d10d4
@ -3,10 +3,10 @@ import { join as pathJoin } from "path";
|
||||
import { constants } from "fs";
|
||||
import { chmod, stat } from "fs/promises";
|
||||
|
||||
async () => {
|
||||
var { bin } = await import(pathJoin(getProjectRoot(), "package.json"));
|
||||
(async () => {
|
||||
const { bin } = await import(pathJoin(getProjectRoot(), "package.json"));
|
||||
|
||||
var promises = Object.values<string>(bin).map(async scriptPath => {
|
||||
const promises = Object.values<string>(bin).map(async scriptPath => {
|
||||
const fullPath = pathJoin(getProjectRoot(), scriptPath);
|
||||
const oldMode = (await stat(fullPath)).mode;
|
||||
const newMode = oldMode | constants.S_IXUSR | constants.S_IXGRP | constants.S_IXOTH;
|
||||
@ -14,4 +14,4 @@ async () => {
|
||||
});
|
||||
|
||||
await Promise.all(promises);
|
||||
};
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user