How to use rubenhak-shelljs - 1 common examples

To help you get started, we’ve selected a few rubenhak-shelljs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github berlioz-the / berlioz / lib / tools / shell.js View on Github external
return new Promise((resolve, reject) => {
            this._screen.info('$ %s', command)
            this._logger.info('RUNNING: %s', command);
            shell.exec(command, { async: true },
                (code, stdout, stderr) => {
                    var result = {
                        code: code, stdout: stdout, stderr: stderr
                    }
                    this._logger.info('EXIT CODE: %s', result.code);
                    if (result.code == 0) {
                        resolve(result);
                    }
                    else {
                        var errStr = 'ErrorCode: ' + result.code;
                        if (result.stderr) {
                            errStr = errStr + ' ERR: ' + result.stderr;
                        }
                        if (result.stdout) {
                            errStr = errStr + ' OUT: ' + result.stdout;
                        }

rubenhak-shelljs

Portable Unix shell commands for Node.js

BSD-3-Clause
Latest version published 7 years ago

Package Health Score

47 / 100
Full package analysis

Popular rubenhak-shelljs functions