2

I am trying to run an exe file from the command prompt from within a grunt task. What I have so far is

 var done = this.async();
 var cp = grunt.util.spawn({
            cmd: path.resolve(options.RH)
     }, done );

 cp.stdout.on('data', function (data) {
     grunt.verbose.writeln('stdout: ' + data.toString());
 });

(there will be args and more interesting stuff later but for now I just want it to run)

It does run and returns the output, however, exe that is running writes a message and then says "to continue please press enter".

This is as far as I get. It just hangs. Is there a way, to spawn a child that requires input?

I hope this is enough to go on, if not please let me know.

Raif
  • 8,641
  • 13
  • 45
  • 56

1 Answers1

1

Not sure if this is the right way to do it ( reference another post ) but it looks like my question is answered here. How to run commands via NodeJS child process?

Community
  • 1
  • 1
Raif
  • 8,641
  • 13
  • 45
  • 56