diff --git a/package.json b/package.json index 8e3846038..c9f3b83b0 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "prepublish:npm": "pnpm build", "publish:npm": "pnpm publish --access public", "start": "nest start", - "studio": "./studio.sh", + "studio": "node ./scripts/run-cli.js", "test": "jest --runInBand --forceExit", "test:integration": "jest --runInBand --forceExit --config jest.integration.config.js", "test:watch": "jest --watch" diff --git a/scripts/run-cli.js b/scripts/run-cli.js new file mode 100644 index 000000000..02e6051ab --- /dev/null +++ b/scripts/run-cli.js @@ -0,0 +1,10 @@ +const { execSync } = require('child_process'); + +const isWin = process.platform === 'win32'; +const args = process.argv.slice(2).join(' '); + +if (isWin) { + execSync(`studio.bat ${args}`, { stdio: 'inherit' }); +} else { + execSync(`./studio.sh ${args}`, { stdio: 'inherit' }); +}