mirror of
https://github.com/fosrl/pangolin.git
synced 2025-12-12 10:58:06 +00:00
Re: "Allow installer to run without sudo & only need it when need to install Docker"
This commit is contained in:
@@ -58,9 +58,11 @@ func main() {
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
|
||||
// check if the user is root
|
||||
if os.Geteuid() != 0 {
|
||||
fmt.Println("This script must be run as root")
|
||||
os.Exit(1)
|
||||
if !isDockerInstalled() {
|
||||
if os.Geteuid() != 0 {
|
||||
fmt.Println("Docker is not installed. Please install Docker manually or run this installer as root.")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
var config Config
|
||||
|
||||
Reference in New Issue
Block a user