carbone
carbone copied to clipboard
expose python and sofficeExecPath as option and improve detection under linux
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.
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.