Giter Site home page Giter Site logo

Colorful output about grunt-exec HOT 13 CLOSED

jharding avatar jharding commented on July 20, 2024
Colorful output

from grunt-exec.

Comments (13)

Dremora avatar Dremora commented on July 20, 2024 1

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.

dickeylth avatar dickeylth commented on July 20, 2024 1

@gwicksted I've created a very simple demo: https://github.com/dickeylth/grunt-exec-issue, you can check out and debug.

from grunt-exec.

nonlux avatar nonlux commented on July 20, 2024

Sorry, color works fine!
Solution

from grunt-exec.

dickeylth avatar dickeylth commented on July 20, 2024

+1 with @Dremora

from grunt-exec.

gwicksted avatar gwicksted commented on July 20, 2024

@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.

gwicksted avatar gwicksted commented on July 20, 2024

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.

gwicksted avatar gwicksted commented on July 20, 2024

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.

dickeylth avatar dickeylth commented on July 20, 2024

@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.

gwicksted avatar gwicksted commented on July 20, 2024

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.

gwicksted avatar gwicksted commented on July 20, 2024

[email protected] (aka grunt-exec@next) now supports the shortcut option stdio: 'inherit'

from grunt-exec.

dickeylth avatar dickeylth commented on July 20, 2024

@gwicksted It worked now, thank you!

from grunt-exec.

dickeylth avatar dickeylth commented on July 20, 2024

@gwicksted I'm wondering when would the grunt-exec@next be released?

from grunt-exec.

gwicksted avatar gwicksted commented on July 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.