db: Don't warn about clearing db when using in-memory db
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded

This commit is contained in:
Jonatan Nilsson 2022-04-19 16:37:45 +00:00
parent 33b3d98a37
commit cb5de72e13
2 changed files with 4 additions and 2 deletions

View file

@ -122,7 +122,9 @@ export default function GetDB(config, log, orgFilename = 'db.json') {
return db.read() return db.read()
.then(function() { .then(function() {
if (!isObject(db.data)) { if (!isObject(db.data)) {
db.log.warn(`File ${fullpath} was empty or not a json object, clearing it.`) if (fullpath !== 'in-memory') {
db.log.warn(`File ${fullpath} was empty or not a json object, clearing it.`)
}
db.data = {} db.data = {}
} }
defaults(db.data, { core: { version: 1 } }) defaults(db.data, { core: { version: 1 } })

View file

@ -1,6 +1,6 @@
{ {
"name": "service-core", "name": "service-core",
"version": "3.0.0-beta.16", "version": "3.0.0-beta.17",
"description": "Core boiler plate code to install node server as windows service", "description": "Core boiler plate code to install node server as windows service",
"main": "index.mjs", "main": "index.mjs",
"scripts": { "scripts": {