module.exports = string => new Promise(
	(resolve, reject) => {
		const git = spawn(
			'git',
			string.split(' '),
		);

		const outputs = { stdout: [], stderr: [] };

		git.stdout.on(
			'data',
			data => outputs.stdout.push(data.toString()),
		);

		git.stderr.on(
			'data',
			data => outputs.stderr.push(data.toString()),
		);

		git.on('exit', code => {
			switch (code) {
				case 0:
					resolve(outputs.stdout.join('').trim());
					break;
				default:
					reject(outputs.stderr.join('').trim());
					break;
			}
		});
	},
);
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.