INNER CODE UNIT · JavaScript

getCommandPath

Megabyteceer/thing-editor · thing-editor/electron-main/build-sounds.js:10

const getCommandPath = (commandName) => {
	const absPath = path.join(__dirname, './.bin/ffmpeg/' + commandName + (isWin ? '.exe' : ''));
	return fs.existsSync(absPath) ? absPath : commandName;
};

module.exports = async function (options) {

	const soundsPath = options.dir;

	let resolve;
	let retPromise = new Promise((_resolve) => {
		resolve = _resolve;
	});
	let result = {};

	function outputError(err, outError, out) {
		if (!result.errors) {
			result.errors = [];

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…