sindresorhus / grunt-shell

Run shell commands
MIT License
949 stars 126 forks source link

not working as expected with django #88

Closed gad2103 closed 9 years ago

gad2103 commented 9 years ago

hi there. i am having some weirdness happen with trying to run django and see the output to stdout:

        shell: {
            browserify: {
                command: './node_modules/.bin/browserify --ignore express ' + browserifySrc.join(' ') + " -o " + browserifyDest
            },
            setup: {
              command: './shell_scripts/setup.sh',
              failOnError: true
            },
            start: {
              /*command: [
                'source venv/bin/activate',
                './post_deploy.sh',
                'source config/config.sh',
                './node_modules/.bin/grunt watch', 
                './manage.py runserver 3274'
              ].join('&&'),*/
              command: 'source venv/bin/activate && ./manage.py runserver 3274',
              failOnError: true,
              options: {
                stout: true,
                stdin: true,
                stderr: true,
                callback: function(err, stdout, stderr, cb) {
                  grunt.event.emit('serverUp');
                  console.log('server started on 3247');
                  console.log(stdout);
                  cb();
                }
              }
            }
        },

i see the task is started by grunt but there is no output to terminal at all until i load the page in the browser at http://localhost:3274. then i can see django logging. but i can't use Ctrl + C to stop the server.

if i run the commands in the terminal myself, i see the output:

Validating models...

0 errors found
January 16, 2015 - 18:44:37
Django version 1.6.1, using settings 'api.settings_local'
Starting development server at http://127.0.0.1:3274/
Quit the server with CONTROL-C.

any help would be awesome! thanks.

sindresorhus commented 9 years ago

Use StackOverflow for support questions. This task is pretty much just a thin wrapper around require('child_process').exec(). So any issue is an issue with the node core function.