mirror of
https://github.com/wekan/wekan.git
synced 2026-01-15 22:15:28 +01:00
22 lines
654 B
JavaScript
22 lines
654 B
JavaScript
var fs = require('fs');
|
|
|
|
let error = false
|
|
|
|
if (!process.env.WRITABLE_PATH) {
|
|
console.error("WRITABLE_PATH environment variable missing and/or unset, please configure !");
|
|
error = true;
|
|
} else {
|
|
try {
|
|
fs.accessSync(process.env.WRITABLE_PATH, fs.constants.W_OK);
|
|
} catch (err) {
|
|
error = true;
|
|
console.error("can't write to " + process.env.WRITABLE_PATH, err);
|
|
console.error("the path of WRITABLE_PATH (" + process.env.WRITABLE_PATH + ") must be writable !!!");
|
|
}
|
|
}
|
|
|
|
if (error) {
|
|
console.error("Stopping Wekan");
|
|
console.error("Wekan isn't runable. Please resolve the error's above and restart Wekan !");
|
|
process.exit(1);
|
|
}
|