Open szimmer1 opened 9 years ago
Hi @szimmer1 so you are suggesting is about improving the error message in https://github.com/CollectionFS/Meteor-cfs-graphicsmagick/blob/master/gm.js#L58-L82 ?
adding something like:
if (!process.env.MAGICK_TMPDIR) {
// Make a warning about this
// ref. https://github.com/CollectionFS/Meteor-CollectionFS/issues/564
console.warn('I can`t read the environment variable "MAGICK_TMPDIR"?\n'+
'If you are trying to use Graphicsmagick on eg. Modulus.io remember '+
'to set the "MAGICK_TMPDIR" env var set to the server temp directory :)');
}
(at https://github.com/CollectionFS/Meteor-cfs-graphicsmagick/blob/master/gm.js#L80 ?)
Yeah. Since it's a operational error I think the best approach is to log an error but not to crash, as you've done. +1 for error reporting :)
Thx
Hey guys, I recently had a problem with gm in production ( Modulus.io ) that I didn't have MAGICK_TMPDIR env var set to the server temp directory. I am using ImageMagick.
Could we get error checking, just to report that if !process.env.MAGICK_TMPDIR a console.log happens or Error event is emitted?
Thanks for all your work, Shahar