fix: remove root check

Changes:
- The owner of the flucky binary must be root. To grant access to the
  binary and third party libs, for example wire1, gpio or i2c, the
  binary must have a sticky bit
This commit is contained in:
Markus Pesch 2019-12-08 15:07:24 +01:00
parent b125bf432c
commit 39b3a495ac
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

14
main.go
View File

@ -3,10 +3,8 @@ package main
import (
"log"
"os"
"os/user"
"github.com/Masterminds/semver"
"github.com/go-flucky/flucky/cmd"
)
@ -15,18 +13,6 @@ var (
)
func main() {
user, err := user.Current()
if err != nil {
panic(err)
}
if user.Uid != "0" {
log.Println("you need to be root to run this command")
os.Exit(1)
}
sversion, err := semver.NewVersion(version)
if err != nil {
log.Printf("The sematic versioning is invalid: %v", version)