It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
var enviroment = process.env.npm_package_config_enviroment;
6
var server_name = process.env.npm_package_config_server;
7
var server_ip = process.env.npm_package_config_ip;
8
var found = false;
9
var preserveFormatting = false;
10
hostile.get(preserveFormatting, function (err, lines) {
11
if (err) {
12
console.error(err.message);
13
}
14
lines.forEach(function (line) {
15
if ( line[0].trim() === '127.0.0.1' ) {
16
line[1].trim().split(' ').forEach(function(elem){
17
if ( elem === server_name){
18
found = true;
19
}
20
});
21
}
22
});
23
if ( !found ){
24
process.stderr.write(chalk.yellow(emoji.emojify("[:raised_hand: ] Server hostname non found on local /etc/hosts \n")));
25
if ( enviroment === 'dev' ){
26
server_ip = '127.0.0.1';
27
}
28
hostile.set(server_ip, server_name, function (err) {
29
if (err) {
30
if ( err.code === 'EACCES' && err.path === '/etc/hosts' ){
31
process.stderr.write(chalk.bgRed.white(emoji.emojify("[:heavy_multiplication_x: ] Impossibile modificare il file automaticamente, \nrieseguire 'npm run check:hostfile' come admin o editare a mano opportuanmente il file\n")));
32
} else {
33
process.stderr.write(chalk.bgRed.white(emoji.emojify("[:heavy_multiplication_x: ] Errore nel settaggio di /etc/hosts\n")));
Use of process.exit() is discouraged as it will potentially stop the complete node.js application. Consider quitting gracefully instead by throwing an Error.
Loading history...
38
} else {
39
process.stdout.write(chalk.bgGreen.black(emoji.emojify('[:heavy_check_mark: ] set /etc/hosts successfully!' + "\n")));