mirror of https://github.com/ericonr/sbctl.git
sbctl: Implement check for sbctl installation
Signed-off-by: Morten Linderud <morten@linderud.pw>
This commit is contained in:
parent
d04e117cbc
commit
2d65668632
9
sbctl.go
9
sbctl.go
|
@ -2,6 +2,7 @@ package sbctl
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
|
@ -199,3 +200,11 @@ func CreateBundle(bundle Bundle) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Checks if sbctl is setup on this computer
|
||||
func CheckSbctlInstallation(path string) bool {
|
||||
if _, err := os.Stat(path); errors.Is(err, os.ErrNotExist) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue