Better way to find home dir even if sudo is used.
This commit is contained in:
@ -19,6 +19,10 @@ import (
|
||||
)
|
||||
|
||||
func CmdNew(c *cli.Context) error {
|
||||
if os.Getuid() != 0 {
|
||||
golog.Fatalf("You need to run this command as root.")
|
||||
}
|
||||
|
||||
name := strings.TrimSpace(c.String("name"))
|
||||
domain := strings.TrimSpace(c.String("domain"))
|
||||
customProjectPath := strings.TrimSpace(c.String("custom-path"))
|
||||
|
Reference in New Issue
Block a user