From 72367078a65540c54046ebe296d6510fd40523f7 Mon Sep 17 00:00:00 2001 From: Ossama Jouini Date: Mon, 25 Dec 2023 22:43:16 +0900 Subject: [PATCH] maybe fixed bug --- commands/scaffold.js | 17 +---------------- package.json | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/commands/scaffold.js b/commands/scaffold.js index 9c8e440..98ae212 100644 --- a/commands/scaffold.js +++ b/commands/scaffold.js @@ -136,22 +136,7 @@ function maybeExecuteInitScript(addonPath) { const initScriptPath = path.resolve(process.cwd(), addonPath, "init.js"); if (fs.existsSync(initScriptPath)) { console.log(`${chalk.white.bold("executing init script ...")}`); - const { exec } = require("child_process"); - exec( - "node init.js", - { cwd: path.resolve(process.cwd(), addonPath) }, - (err, stdout, stderr) => { - if (err) { - console.error(err); - reject(err); - return; - } - console.log( - `${chalk.green.bold("init script executed successfully")}` - ); - resolve(); - } - ); + require(initScriptPath); } else { resolve(); } diff --git a/package.json b/package.json index 1f3b92e..44530b4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "c3ide2-cli", "description": "A simple CLI for scaffolding construct 3 addons using c3ide2-framework", - "version": "1.2.0", + "version": "1.2.1", "main": "index.js", "license": "MIT", "dependencies": {