Skip to content

Commit 4da9b6e

Browse files
committed
Added v0.10.0 error.
1 parent 8f047ae commit 4da9b6e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

DirtyAdapter.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,14 @@ module.exports = (function () {
378378
}
379379
else {
380380

381+
// Node v0.10.0 compatibility error
382+
if (process.version === 'v0.10.0') {
383+
sails.log.error("Because of an underlying issue with felixge's node-dirty (),");
384+
sails.log.error("the development-only persistent disk store in the sails-dirty adapter is not compatibile with node v0.10.0.");
385+
sails.log.error("Please use the MySQL or MongoDB adapter, switch the inMemory flag to true, or revert to node 0.8.22 using a solution like TJ Hollaway's `n`.");
386+
process.exit(1);
387+
}
388+
381389
// Check that filePath file exists and build tree as neessary
382390
require('fs-extra').createFile(collection.filePath, function(err) {
383391
if(err) return cb(err);
@@ -386,7 +394,7 @@ module.exports = (function () {
386394
fileDb.on('load', function() {
387395
cb(null, {
388396
db : fileDb,
389-
inMemory : true
397+
inMemory : false
390398
});
391399
});
392400
});

0 commit comments

Comments
 (0)