|
|
@ -23,13 +23,18 @@ function requirements() { |
|
|
|
shell.exit(1); |
|
|
|
} |
|
|
|
|
|
|
|
// Check if sudo
|
|
|
|
if (process.getuid() != 0) { |
|
|
|
console.log("`up` requires root privileges to work. Please use `sudo up <command>`"); |
|
|
|
shell.exit(1); |
|
|
|
} |
|
|
|
|
|
|
|
// Throw if Nginx is not found
|
|
|
|
if (!shell.which('nginx')) { |
|
|
|
shell.echo( |
|
|
|
'I need nginx to work. Install nginx first. https://nginx.org/'); |
|
|
|
shell.exit(1); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
module.exports = requirements; |
|
|
|