H
H
HokafD2021-01-08 21:03:53
JavaScript
HokafD, 2021-01-08 21:03:53

Error when authorizing in HEROKU CLI through a child process, how to fix?

var cp = require('child_process');

var child = cp.exec('heroku login -i');

child.stdout.setEncoding('utf8');
    child.stdout.on('data', function(data) {
        console.log('Логи: '+data)

        data=data.toString();
        scriptOutput+=data;
    });

    child.stderr.setEncoding('utf8');
    child.stderr.on('data', function(data) {
        console.log('Логи: '+data)
        
        data=data.toString();
        scriptOutput+=data;
    });

child.stdin.write('почта');
child.stdin.write('пароль');
child.stdin.end()


I get an error when using this code sh: 1: read: Illegal option -s, how can I fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question