Comments (13)
Still an issue in my case since the command I'm trying to execute doesn't have any flags to enable colors.
from grunt-exec.
@gwicksted I've created a very simple demo: https://github.com/dickeylth/grunt-exec-issue, you can check out and debug.
from grunt-exec.
Sorry, color works fine!
Solution
from grunt-exec.
+1 with @Dremora
from grunt-exec.
@Dremora and @dickeylth can you detail what the command is you are executing and what output is displayed + what you expected for color highlighting?
Also, have you tried this type of configuration (the stdout: 'inherit'
is the important part):
module.exports = function(grunt) {
grunt.initConfig({
exec: {
something: {
command: process.platform === 'win32' ? 'dir' : 'ls -la'
, stdout: 'inherit'
, stderr: 'inherit'
}
}
});
};
from grunt-exec.
I have reproduced the issue and implemented a fix - it is a major change due to the capabilities of child_process.exec. The next release (2.0.0) will contain this capability.
from grunt-exec.
Please try [email protected]
aka grunt-exec@next
for the new behavior. grunt-exec@latest
is still the stable 1.0.1
release. One of the tests is failing so I'm looking into it but things are otherwise stable.
from grunt-exec.
@gwicksted I've updated and retried, and unfortunately it still won't work:
Plus my env:
grunt-exec-issue ➤ npm --version
3.10.9
[email protected] (/usr/local/bin/node)
[email protected] (/usr/local/lib/node_modules/tnpm/node_modules/.2.16.0@npminstall/lib/index.js)
prefix=/usr/local (load prefix from: $ npm config get prefix)
darwin x64 16.3.0
from grunt-exec.
Hi @dickeylth , please try with the stdout: 'inherit' option. Example change to your grunt file: https://github.com/gwicksted/grunt-exec-issue/tree/patch-1
from grunt-exec.
[email protected]
(aka grunt-exec@next
) now supports the shortcut option stdio: 'inherit'
from grunt-exec.
@gwicksted It worked now, thank you!
from grunt-exec.
@gwicksted I'm wondering when would the grunt-exec@next
be released?
from grunt-exec.
@dickeylth I was holding back the release a bit because it replaces the entire back-end of grunt-exec. That said, I've been using this version since Jan with no issues so I think it's safe to mark it stable.
from grunt-exec.
Related Issues (20)
- exec failed to execute rpmbuild but the commands succeeds if run directly HOT 3
- Use a function to set the cwd HOT 2
- Do not execute Multiple cmd HOT 6
- If child is killed, task output should show the kill signal, not 'exited with 0' HOT 1
- Command working on shell but not with grunt-exec HOT 2
- Update Grunt dependency HOT 14
- Better error message when exceeding maxBuffer size HOT 5
- Document how to run multiple commands
- Support an array of commands to execute HOT 1
- Success after maxBuffer size is reached HOT 1
- Allow to pass function for cwd parameter HOT 1
- Unix combine commands with && does not work HOT 4
- What is detached mode? HOT 5
- WINDOWS REGRESSION: command with double-quotes cannot be executed HOT 6
- Redirecting command output to a file does not work ( using >> or > ) HOT 1
- Provide a changelog for 2.0.0 HOT 4
- Cannot perform command with quotes HOT 5
- stdin not work with inquirer HOT 1
- rsync with sshpass HOT 1
- $PATH with grunt exec 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 grunt-exec.