quick update to make initial error easier to find if noble not installed

pull/2116/head^2
Gordon Williams 2022-09-09 09:41:00 +01:00
parent faf879c59c
commit 23eb487024
1 changed files with 3 additions and 2 deletions

View File

@ -15,8 +15,6 @@ var SETTINGS = {
pretokenise : true pretokenise : true
}; };
var APPSDIR = __dirname+"/../apps/"; var APPSDIR = __dirname+"/../apps/";
//eval(require("fs").readFileSync(__dirname+"../core/js/utils.js"));
var AppInfo = require("../core/js/appinfo.js");
var noble; var noble;
try { try {
noble = require('@abandonware/noble'); noble = require('@abandonware/noble');
@ -29,12 +27,15 @@ if (!noble) {
console.log(" npm install @abandonware/noble") console.log(" npm install @abandonware/noble")
console.log("or:") console.log("or:")
console.log(" npm install noble") console.log(" npm install noble")
process.exit(1);
} }
function ERROR(msg) { function ERROR(msg) {
console.error(msg); console.error(msg);
process.exit(1); process.exit(1);
} }
//eval(require("fs").readFileSync(__dirname+"../core/js/utils.js"));
var AppInfo = require("../core/js/appinfo.js");
global.Const = { global.Const = {
/* Are we only putting a single app on a device? If so /* Are we only putting a single app on a device? If so
apps should all be saved as .bootcde and we write info apps should all be saved as .bootcde and we write info