Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | var chalk = require('chalk'); |
||
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"))); |
||
34 | process.stderr.write(chalk.red(err+"\n")); |
||
35 | } |
||
36 | |||
37 | process.exit(1); |
||
|
|||
38 | } else { |
||
39 | process.stdout.write(chalk.bgGreen.black(emoji.emojify('[:heavy_check_mark: ] set /etc/hosts successfully!' + "\n"))); |
||
40 | } |
||
41 | }); |
||
42 | } else { |
||
46 |