authelia/scripts/utils/exec.js
Clement Michaud 76fa325f08 [BREAKING] Create a suite for kubernetes tests.
Authelia client uses hash router instead of browser router in order to work
with Kubernetes nginx-ingress-controller. This is also better for users having
old browsers.

This commit is breaking because it requires to change the configuration of the
proxy to include the # in the URL of the login portal.
2019-03-16 00:13:27 +01:00

18 lines
511 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var spawn = require('child_process').spawn;
function exec(cmd) {
return new Promise((resolve, reject) => {
const command = spawn(cmd, {shell: true, env: process.env});
command.stdout.pipe(process.stdout);
command.stderr.pipe(process.stderr);
command.on('exit', function(statusCode) {
if (statusCode != 0) {
reject(new Error('Command \'' + cmd + '\' has exited with status ' + statusCode + '.'));
return;
}
resolve();
})
})
}
module.exports = { exec }