From a09fa6708fe5bc88e059b165e2940a7355d364ca Mon Sep 17 00:00:00 2001 From: txthinking Date: Sun, 6 Mar 2022 14:09:47 +0800 Subject: [PATCH] _ --- hancock.go | 1 + instance.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hancock.go b/hancock.go index 5aa6444..0bf5b2d 100644 --- a/hancock.go +++ b/hancock.go @@ -168,6 +168,7 @@ func (h *Hancock) prepare(args []string) (*Instance, string, error) { } has, err := i.HasNami() if err != nil { + log.Println(1) return nil, "", err } if !has { diff --git a/instance.go b/instance.go index 0b623f1..d47b443 100644 --- a/instance.go +++ b/instance.go @@ -95,7 +95,7 @@ func (i *Instance) HasNami() (bool, error) { defer s.Close() s1, err := s.CombinedOutput("sudo -H -u root sh -c '[ -f /root/.nami/bin/nami ] && echo 1'") if err != nil { - return false, err + return false, nil } if strings.TrimSpace(string(s1)) != "1" { return false, nil @@ -111,7 +111,7 @@ func (i *Instance) HasJoker() (bool, error) { defer s.Close() s1, err := s.CombinedOutput("sudo -H -u root sh -c '[ -f /root/.nami/bin/joker ] && echo 1'") if err != nil { - return false, err + return false, nil } if strings.TrimSpace(string(s1)) != "1" { return false, nil