Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
fix shell error in v_checker, fix sm checker in core
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx committed Mar 5, 2021
1 parent 1cce3f2 commit 73aa133
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
30 changes: 14 additions & 16 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"github.com/secman-team/secman/v5/insert"
"github.com/secman-team/secman/v5/pio"
"github.com/secman-team/secman/v5/show"
"github.com/secman-team/secman/v5/plugins"
"github.com/secman-team/secman/v5/upgrade"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -235,28 +237,24 @@ const cmd string = clone + "sm /home/sm"
// main
func main() {
if runtime.GOOS == "windows" {
if _, err := os.Stat("~/sm"); err != nil {
if os.IsNotExist(err) {
RootCmd.Execute()
} else {
loading("installing windows deps...")
if _, err := os.Stat("~/sm"); !os.IsNotExist(err) {
RootCmd.Execute()
} else {
loading("installing windows deps...")

shell.SHCore(cmd, winCmd)
shell.SHCore(cmd, winCmd)

RootCmd.Execute()
}
RootCmd.Execute()
}
} else {
if _, err := os.Stat("/home/sm"); err != nil {
if os.IsNotExist(err) {
RootCmd.Execute()
} else {
loading("installing linux/macos deps...")
if _, err := os.Stat("/home/sm"); !os.IsNotExist(err) {
RootCmd.Execute()
} else {
loading("installing linux/macos deps...")

shell.SHCore(cmd, winCmd)
shell.SHCore(cmd, winCmd)

RootCmd.Execute()
}
RootCmd.Execute()
}
}
}
2 changes: 1 addition & 1 deletion plugins/v_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func Checker() {
s.Suffix = " Checking for updates..."
s.Start()

SHCore("verx --sm", "bash vx --sm")
shell.SHCore("verx --sm", "bash vx --sm")

s.Stop()
}

0 comments on commit 73aa133

Please sign in to comment.