From cb5defb5307cbdeb0dd48d8825eae47d1855de82 Mon Sep 17 00:00:00 2001 From: artemijspavlovs <19916123+artemijspavlovs@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:59:10 +0700 Subject: [PATCH] fix: logic --- cmd/rollapp/init/init.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/rollapp/init/init.go b/cmd/rollapp/init/init.go index 44ac2b18..d4d918a6 100644 --- a/cmd/rollapp/init/init.go +++ b/cmd/rollapp/init/init.go @@ -55,12 +55,6 @@ func Cmd() *cobra.Command { var env string var raID string - err = servicemanager.StopSystemServices() - if err != nil { - pterm.Error.Println("failed to stop system services: ", err) - return - } - isRootExist, err := filesystem.DirNotEmpty(home) if err != nil { pterm.Error.Printf( @@ -101,6 +95,12 @@ func Cmd() *cobra.Command { } } + err = servicemanager.StopSystemServices() + if err != nil { + pterm.Error.Println("failed to stop system services: ", err) + return + } + err = filesystem.CreateRollerRootWithOptionalOverride(home) if err != nil { pterm.Error.Printf(