From b7e1683e375af6678c34b5e035a9193b427b0c83 Mon Sep 17 00:00:00 2001 From: Sergey Rubanov Date: Fri, 12 Jan 2024 08:12:48 +0100 Subject: [PATCH] fix win --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b52f6a9..232979b 100755 --- a/index.js +++ b/index.js @@ -197,6 +197,7 @@ async function main (argv) { } pkg.type = 'module' + pkg.scripts['init-project'] = 'ssc init --config' pkg.scripts.start = 'ssc build -r -o' pkg.scripts.build = 'ssc build -o' pkg.scripts.test = 'ssc build -r -o --test=./test/index.js --headless' @@ -217,8 +218,8 @@ async function main (argv) { process.stdout.write('Creating socket files...') // Use spawn so we can pass stdio, fte is interactive const initProcess = spawn( - 'ssc', - ['init', '--config'], + `npm${os.platform() === 'win32' ? '.cmd' : ''}`, + ['run', 'init-project'], { stdio: [process.stdin, process.stdout, process.stderr] })