diff --git a/src/bin/tools/grant-exec-perms.ts b/src/bin/tools/grant-exec-perms.ts index dab91c6b..315f39bb 100644 --- a/src/bin/tools/grant-exec-perms.ts +++ b/src/bin/tools/grant-exec-perms.ts @@ -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(bin).map(async scriptPath => { + const promises = Object.values(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); -}; +})();