You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.
var fs = require('fs')
var path = require('path')
var clicolour = require('cli-color')
var error = require('../../../libs/error/bsod.js')
var files = ["app.js", "node_modules", "libs"];
var i;
exports.checkFiles = function checkFiles(x){
// TODO: Fix issue where files[i] is undefined
console.log(clicolour.yellowBright("ALPHA:")+"Checking out files need fixing, does in fact check out files correctly");
for (var i = 0; i < files.length; i++) {
fs.stat(files[i], function(err, stat){
if(err === null){
return console.log('Checked out file '+files[i]+"..."+clicolour.greenBright("OK"));
console.log(i);
}
else if( err.code == 'ENOENT'){
console.log('Checked out file '+files[i]+"..."+clicolour.redBright("ERROR!"));
throw error.throwError("BOOT_"+err.code+"_CHECKS_NOT_FOUND:"+files[i], err, err.code);
}
else{
console.log('Checked out file '+files[i]+"..."+clicolour.redBright("ERROR!"));
throw error.throwError("BOOT_CHECKS_FILES_"+err.code+":"+files[i], err, err.code);
}
});
}
});
};
Output:
Checked out file undefined...OK
Checked out file undefined...OK
Checked out file undefined...OK
The text was updated successfully, but these errors were encountered:
File: boot/libs/checks/checkFile.js
Code:
Output:
The text was updated successfully, but these errors were encountered: