carbone icon indicating copy to clipboard operation
carbone copied to clipboard

expose python and sofficeExecPath as option and improve detection under linux

Open Thorsten2k3 opened this issue 7 years ago • 1 comments

It would be better if you expose them as option. It's a extreme headache for your admin to keep the office up to date otherwise. And to top it of, there is a much better way to get your python and soffice binary under linux:

const fs = require('fs');

process.env.PATH.split(':').forEach(function(dir){
	if (fs.existsSync(dir)){
		var files = fs.readdirSync(dir);
		files.forEach(function(file){
			if(file == 'python' || file == 'soffice'){
				console.log(dir + '/' + file);
			}
		});
	}
});

Maybe keep your old method as failover, but under linux there should always be an PATH env.

Thorsten2k3 avatar Mar 20 '18 08:03 Thorsten2k3

Hi,

Thanks for the message first. It can be a good enhancement and it can be implemented, we keep the idea. In the meanwhile, don't hesitate to contribute through pull request.

steevepay avatar Oct 08 '19 14:10 steevepay