diff --git a/scripts/detect_services/index.ts b/scripts/detect_services/index.ts index 89a46169..aee715e1 100644 --- a/scripts/detect_services/index.ts +++ b/scripts/detect_services/index.ts @@ -1,5 +1,4 @@ import * as fs from 'fs'; -import { noop } from 'lodash'; import * as path from 'path'; import * as cp from 'child_process'; diff --git a/scripts/generate_services/index.ts b/scripts/generate_services/index.ts index 9e1ba428..bfa59fb5 100644 --- a/scripts/generate_services/index.ts +++ b/scripts/generate_services/index.ts @@ -1,9 +1,12 @@ -import * as cp from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; import * as fg from 'fast-glob'; import { detectRootServices, writeToFile } from '../detect_services'; +import { promisify } from 'node:util'; +import child_process from 'node:child_process'; +const exec = promisify(child_process.exec); + const PROTO_DIR = path.resolve('./cloudapi'); const YANDEX_CLOUD_DIR = path.join(PROTO_DIR, 'yandex', 'cloud'); const CLIENTS_DIR = path.resolve('./clients'); @@ -34,7 +37,7 @@ const generateService = async (dir: string) => { ]; const command = commandArgs.join(' '); - cp.execSync(command); + await exec(command); }; const main = async () => {