Move checkRoot to main

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis
2023-09-14 15:53:27 +03:00
parent fddbf3f657
commit bf40c48812
6 changed files with 29 additions and 36 deletions

View File

@@ -55,10 +55,6 @@ func displayInfo(agentConfig *Config) {
}
func ManualInstall(c, device string, reboot, poweroff, strictValidations bool) error {
if err := checkRoot(); err != nil {
return err
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -89,10 +85,6 @@ func ManualInstall(c, device string, reboot, poweroff, strictValidations bool) e
}
func Install(dir ...string) error {
if err := checkRoot(); err != nil {
return err
}
var cc *config.Config
var err error