kn-cli 1.0.104 → 1.0.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/build.js +12 -6
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -282,17 +282,23 @@ module.exports= async (options={})=> {
|
|
|
282
282
|
|
|
283
283
|
_link_node_modules_from = TransformWindowsPath(_link_node_modules_from);
|
|
284
284
|
_link_node_modules_to = TransformWindowsPath(_link_node_modules_to);
|
|
285
|
-
console.log(chalk.green.bold('_link_node_modules_to:'+_link_node_modules_to));
|
|
286
|
-
console.log(chalk.green.bold('_link_node_modules_from:'+_link_node_modules_from));
|
|
285
|
+
// console.log(chalk.green.bold('_link_node_modules_to:'+_link_node_modules_to));
|
|
286
|
+
// console.log(chalk.green.bold('_link_node_modules_from:'+_link_node_modules_from));
|
|
287
287
|
let _link_node_modules=`ln -s ${_link_node_modules_from} ${_link_node_modules_to}`;
|
|
288
288
|
if (IS_WINDOWS()) {
|
|
289
|
-
_link_node_modules=`mklink /D
|
|
289
|
+
_link_node_modules=`mklink /D ${_link_node_modules_to} ${_link_node_modules_from} `;
|
|
290
|
+
task.output='请单独使用管理员身份执行:'+_link_node_modules
|
|
291
|
+
resolve();
|
|
292
|
+
return;
|
|
290
293
|
}else{
|
|
291
294
|
_link_node_modules=`ln -s ${_link_node_modules_from} ${_link_node_modules_to}`;
|
|
292
295
|
}
|
|
293
|
-
task.output='执行link'
|
|
294
|
-
|
|
295
|
-
|
|
296
|
+
task.output='执行link:'+_link_node_modules
|
|
297
|
+
let req= shelljs.exec(_link_node_modules);
|
|
298
|
+
if(req.code!=0){
|
|
299
|
+
console.log(chalk.red.bold('执行link异常:'+req.stdout));
|
|
300
|
+
console.log(chalk.red.bold('执行link异常:'+req.stderr));
|
|
301
|
+
}
|
|
296
302
|
}
|
|
297
303
|
resolve();
|
|
298
304
|
|