From 3ea2cb597b36eb8286b0caec57c0e951c86bba98 Mon Sep 17 00:00:00 2001 From: Kosta <68782786+KostaD02@users.noreply.github.com> Date: Mon, 18 Sep 2023 22:28:50 +0400 Subject: [PATCH] fix: handling os commands differently for windows and linux --- package.json | 3 ++- src/main.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 80dc0b3..ba44e69 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ ], "scripts": { "build": "nest build", - "build:doc": "build-doc.sh", + "build:doc": "./build-doc.sh", + "build:doc:windows": "build-doc.sh", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "node dist/main", "start:dev": "nest start --watch", diff --git a/src/main.ts b/src/main.ts index 6209483..97a7294 100644 --- a/src/main.ts +++ b/src/main.ts @@ -37,7 +37,7 @@ async function bootstrap() { SwaggerModule.setup('docs/swagger', app, document); // Builds mdbook documentation in dist/docs - cp.exec('npm run build:doc'); + cp.exec(`npm run build:doc${process.platform === 'win32' ? ':windows' : ''}`); await app.listen(process.env.PORT || 3000); }