|
|
@ -4,11 +4,7 @@ const promisifiedExec = promisify(exec); |
|
|
|
const process = require("process"); |
|
|
|
|
|
|
|
module.exports.checkSudo = function () { |
|
|
|
if (process.getuid && process.getuid() == 0) { |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
throw new Error("You need to be root to run this package."); |
|
|
|
}; |
|
|
|
return process.getuid && process.getuid() == 0 ? true : false; |
|
|
|
}; |
|
|
|
|
|
|
|
module.exports.checkNodeVersion = function () { |
|
|
|