Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Mar 6, 2022
1 parent 7b5c755 commit a09fa67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions hancock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a09fa67

Please # to comment.