jharding / grunt-exec

Grunt plugin for executing shell commands.
https://npmjs.org/package/grunt-exec
Other
248 stars 47 forks source link

exec failed to execute rpmbuild but the commands succeeds if run directly #64

Closed ammaraltahan closed 8 years ago

ammaraltahan commented 9 years ago

I've setup exec to run rpmbuild and it did for a while until we changed something in the packaged files then it started failing.

Grungfile.js : build_rpm:{ cmd: 'rpmbuild -ba <%= rpm_dir %>/SPECS/cdr.spec' }

Output: .... ....

Exited with code: 0. Warning: Task "exec:build_rpm" failed. Use --force to continue.

Aborted due to warnings.

ammaraltahan commented 9 years ago

I figured out what happened... I used grunt-shell and it gave me more specific error, it told me that I've exceeded maxBuffer size, and grunt-shell does take maxBuffer as a parameter, so I just increased the buffer and it succeeded.

It is rather strange that even though I turn off stdout for exec, it still fails!

you may need to add an option to select maxBuffer as others may run into this issue.

AdrianDroid commented 9 years ago

same thing happened while we run r.js or some pc even simple copy cmd.

Weird thing is .... it is happening depending on machine. our build server (win2003) and a few PC (Win7) happen to have this symptom.

yet others are fine witht he exact some code.

i have even clone the node_modules folder to ensure all the npm install are the same.

anyone care to have a look on this issue?

gwicksted commented 8 years ago

Marking this as a dup for now but a better error message would be more helpful. I'll create a new issue for this.