Skip to content

Commit 27a38d4

Browse files
committed
fix(init): fix windows 'module' is not defined error when running setup command
1 parent 9916289 commit 27a38d4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/commands/init.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ exports.run = function (options) {
159159

160160
function setup(callback) {
161161
var initParams = process.argv.slice(4) || [];
162-
var setupCmd = 'ykit setup ' + initParams.join(' ');
162+
var setupCmd = 'node ' + sysPath.join(__dirname, '../../bin/ykit') + ' setup ' + initParams.join(' ');
163+
163164
logInfo('Run ' + setupCmd);
164165
shell.exec(setupCmd, {
165166
silent: false

src/commands/init.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ exports.run = function(options) {
160160

161161
function setup(callback) {
162162
const initParams = process.argv.slice(4) || [];
163-
const setupCmd = `ykit setup ${initParams.join(' ')}`;
163+
const setupCmd = `node ${sysPath.join(__dirname, '../../bin/ykit')} setup ${initParams.join(' ')}`;
164+
164165
logInfo('Run ' + setupCmd);
165166
shell.exec(setupCmd, {
166167
silent: false

0 commit comments

Comments
 (0)