简体   繁体   English

如何从在gulp-run中执行的进程打印控制台消息?

[英]How to print in console message from a process executing in gulp-run?

I am using gulp-run in order to execute a command "vagrant up" (valid also for any other command). 我正在使用gulp-run来执行命令“无用功”(对其他任何命令同样有效)。

When running "vagrant up" in command prompt log messages are printed , when running the same command from gulp-run no messages are printed in the command propmt. 在命令提示符中运行“无用启动”时, 将打印日志消息 ,而从gulp-run运行相同的命令时, 不会在命令propmt 中打印任何消息

My question: 我的问题:

  • How could I show up log messages from the process being called when using gulp-run in the command prompt where gulp-run is executed? 我怎么会出现在过程日志消息被称为使用时gulp-run在命令提示符下gulp-run执行?
  • If you know a better way to call this command in my gulp script, please let me know. 如果您知道在我的gulp脚本中调用此命令的更好方法,请告诉我。

 gulp.task('test', function () {
        var cmd = new run.Command('vagrant up', {
            cwd: '../util/vagrant_tools',
            verbosity:2
        });
        cmd.exec();
    })

verbosity选项设置为3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM