GithubHelp home page GithubHelp logo

Comments (12)

sindresorhus avatar sindresorhus commented on July 28, 2024

Does it work when running the command directly?

// @gingermusketeer any thoughts?

from grunt-shell.

Freyskeyd avatar Freyskeyd commented on July 28, 2024

Yeah when i run command directly all works fine..

Le 12 déc. 2013 à 12:26, Sindre Sorhus [email protected] a écrit :

Does it work when running the command directly?

// @gingermusketeer any thoughts?


Reply to this email directly or view it on GitHub.

from grunt-shell.

gingermusketeer avatar gingermusketeer commented on July 28, 2024

I had a quick look. The behaviour does appear to have changed in the latest version since this was added. However even going back to when this was merged has issues.

I am wondering if child_process.exec has changed in recent versions of node (i tested it on v0.10.21). Does anyone know if this is the case?

from grunt-shell.

Freyskeyd avatar Freyskeyd commented on July 28, 2024

I don't know if child_process.exec has changed but i'm using v0.10.22, in changelog we can see:
child_process: don't assert on stale file descriptor events (Fedor Indutny) changelog

from grunt-shell.

Freyskeyd avatar Freyskeyd commented on July 28, 2024

any news?
Reproduce?

from grunt-shell.

sindresorhus avatar sindresorhus commented on July 28, 2024

Does this work?

node -e "var exec = require('child_process').exec;var cp = exec('php artisan database:proprio:zero --no-ansi', function (err, stdout, stderr) {console.log(err, stdout, stderr);});process.stdin.pipe(cp.stdin);"

from grunt-shell.

Freyskeyd avatar Freyskeyd commented on July 28, 2024

mmmh,

I get this:
`null 'What is your name?' ''``

When i launch command i see nothing but when i press enter i see the question and the response is set to null.
Maybe a flush in php?

from grunt-shell.

moszeed avatar moszeed commented on July 28, 2024

same problem here.

trying to automate "jarsigner":

        androidJarSigner        : {
            options : {
                stdout : true,
                stdin : true
            },
            command : function(keystore, apk) {
                var querystring = require('querystring');
                return  'jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 ' +
                        '-keystore ' + querystring.unescape(keystore) + ' ' + querystring.unescape(apk) + ' ' +
                        'alias_name';
            }
        }

if i call task directly all runs fine, but if its called in gruntfile script with grunt.task.run the user input will not be recognized

from grunt-shell.

sindresorhus avatar sindresorhus commented on July 28, 2024

Can you try out ff9753b ?

from grunt-shell.

moszeed avatar moszeed commented on July 28, 2024

@sindresorhus now it works. thx!

from grunt-shell.

wclr avatar wclr commented on July 28, 2024

great, that fixes things!

from grunt-shell.

sindresorhus avatar sindresorhus commented on July 28, 2024

fixed in 0.6.2

from grunt-shell.

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.