Comments (4)
Guys, just do it the way @RIAEvangelist says on his comment. For example, in my case I'm running Android unit tests with Graddle:
let buildRef = cmd.get(`
cd ${androidStudioPath}
./gradlew test --stacktrace
`);
let unitRefData = '';
let unitRefError = '';
unitRef.stderr.on('data', function (data) {
unitRefError += data;
});
unitRef.stdout.on('data', function (data) {
unitRefData += data;
});
unitRef.stdout.on('close', function () {
if (unitRefData.includes('BUILD SUCCESSFUL')) {
console.log('Output:', unitRefData);
} else {
console.log('Output:', unitRefError);
}
});
from node-cmd.
this is a tricky one it would require splitting the output up. Perhaps the python example would provide some help?
https://github.com/RIAEvangelist/node-cmd/blob/master/example/nodePythonTerminal.js
from node-cmd.
I just run into the same problem, is there a plan to implement solution for that or do I need to look for another package?
from node-cmd.
Same problem here. Would love a way to be able to configure node-cmd with a larger buffer value.
from node-cmd.
Related Issues (20)
- How to use this to open an exe (Which is a CLI tool) and then fire commands HOT 1
- Output from get not displaying what outputs from the terminal HOT 2
- How to execute commands with ZSH environment HOT 1
- Not Calling Function Callback HOT 1
- Add options to exec HOT 2
- How to get stderr when using promises HOT 1
- async await example? HOT 1
- returns data missing HOT 1
- compgen -c is the only command that does not produce output HOT 1
- Can we run command as adminstrator HOT 1
- Getting stdout streaming HOT 1
- is this project still being maintained? HOT 1
- 苹果笔记本上可以使npm-cmd吗?
- Add get process by Id HOT 2
- Example Error? HOT 4
- Promise API? HOT 2
- answering to a CMD y/n prompt HOT 2
- how to kill a node-cmd process ?
- How do I run command with admin ?
- Does Node-Cmd the console close? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-cmd.