Skip to content

Commit

Permalink
Merge pull request #166 from kevincobain2000/refactoring-09122023
Browse files Browse the repository at this point in the history
Refactoring 09122023
  • Loading branch information
kevincobain2000 authored Dec 10, 2023
2 parents 394402c + 95e7c08 commit ac689a5
Show file tree
Hide file tree
Showing 5 changed files with 568 additions and 601 deletions.
10 changes: 9 additions & 1 deletion cmd/gobrew/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"

"github.com/kevincobain2000/gobrew"
"github.com/kevincobain2000/gobrew/utils"
)

var args []string
Expand Down Expand Up @@ -73,7 +74,14 @@ func init() {
}

func main() {
gb := gobrew.NewGoBrew()
homeDir, ok := os.LookupEnv("GOBREW_ROOT")
if !ok || homeDir == "" {
var err error
homeDir, err = os.UserHomeDir()
utils.CheckError(err, "failed get home directory and GOBREW_ROOT not defined")
}

gb := gobrew.NewGoBrew(homeDir)
switch actionArg {
case "interactive", "info":
gb.Interactive(true)
Expand Down
Loading

0 comments on commit ac689a5

Please sign in to comment.